Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating field aliases...

Status
Not open for further replies.

duckyboyz

Programmer
Mar 28, 2002
57
US
does it matter whether you enclose the the alias name in quotes or not?

i.e.

SELECT Lname AS Lastname (no quotes)
from Personnel

or


SELECT Lname AS "Lastname" (double quotes)
from Personnel

or

SELECT Lname AS 'Lastname' (single quotes)
from Personnel


from Personnel
 
For MSSQL any of your options will work

Same goes for Oracle if I rember right

Though the standard for ansi would be

SELECT column AS columnname FROM tablename

without any quotes

j
 
For sql server (and access) it should be (but they will work) either

SELECT Lname AS Lastname
from Personnel

or

SELECT Lname AS [Lastname]
from Personnel


======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top