-- Topica Digest --
	
	SQL [DOUBLE QUOTES AND SINGLE QUOTES - 08/03/2000]
	By tipworld@boing.topica.com
	
	SQL [QUOTES INSIDE STRINGS - 08/04/2000]
	By tipworld@boing.topica.com

------------------------------------------------------------

From: tipworld@boing.topica.com
Subject: SQL [DOUBLE QUOTES AND SINGLE QUOTES - 08/03/2000]


TipWorld - http://www.tipworld.com                
The Internet's #1 Source for Computer Tips, News, and Gossip                
                
Proudly presents:  
         
And now for today's tip...                
                
DOUBLE QUOTES AND SINGLE QUOTES                  
         
When should you use single or double quotes? Depending on your DBMS 
and the way it's implemented, it's possible that both may work. The 
ANSI standard, however, is to use single quotes for string literals 
and to use double quotes for table and column names. The following is 
an example of the correct use of literals in ANSI SQL: 

 Select "column1", "column2" 
 From "Table1" 
 Where Column1 = 'abcdef'; 

You can change the title of a column to be used when the result set is 
displayed, using double quotes as follows: 

 Select column1, column2 "New Column Name" 
 From Table1 
 Where Column1 = 'abcdef'; 

You usually do not need to use double quotes for column or table 
names, but if there is an unusual character in the name, you may need 
to use the quotes. I've seen this occur when a Microsoft Access Table 
was exported to Oracle using lowercase table and column names--in 
which case I had to use double quotes to drop the table. 

In general, the single quotes should be honored for literals, thereby 
complying with the ANSI standard. 

