The first two examples are selecting the literal value 'mike' and '1' In the first example, you are telling SQL to give the column containing 'mike' a name of 'name'.
A practical example of where you might use this behaviour might be : SELECT 'Invoice' as doctype, invoiceno, invoicedate, amount FROM dbo.invoices WHERE amount > '0' or SELECT 'Credit' as doctype, invoiceno, invoicedate, amount FROM dbo.invoices WHERE amount < '0' Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Tue, Feb 17, 2009 at 11:41 AM, Mike Soultanian <msoul...@csulb.edu> wrote: > > I was curious if anyone knows how you describe the following SQL > functionality: > > SELECT 'mike' as name > > returns a single column named "name" with a single row containing "mike" > > I also know you can do stuff like: > > SELECT 1 > > Which returns a column named "1" with a single row containing "1", or: > > SELECT 4/2 > > which returns a column named "4/2" with a single row containing "2.000" > > The last one is obvious as it's SQL arithmetic, but what are the first > two examples? Are those also examples of "SQL arithmetic" as well? I > can't find this kind of SQL functionality described or documented > anywhere on the net. > > Thanks! > Mike > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319389 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4