GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 78 of 171    Print  
What is the difference between single quote (') and double quote(") in relates to using in SQL. When do you use 'xxx' and "xxx"? what is the difference both of them?

  
Total Answers and Comments: 3 Last Update: February 06, 2008     Asked by: michelle 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 24, 2006 14:53:03   #1  
na123 Member Since: March 2006   Contribution: 10    

RE: What is the difference between single quote (') an...

single quote is used to write a character string or character in sql query.

but double quotes are used to print the name in sql screen.

for eg:-

select sysdate current date from dual;

current date

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

24-mar-06.

in single quote oracle takes the character as a keyword.


 
Is this answer useful? Yes | No
December 04, 2006 14:09:11   #2  
rampratap409 Member Since: September 2006   Contribution: 111    

RE: What is the difference between single quote (') an...

double quote( ) is used to give user defined column alias

example:

select empno ename employee name from emp;

this will print column heading as: EMPNO employee name

where as single quote is used for passing a string

select ename||' is employee since '||hiredate from emp;


 
Is this answer useful? Yes | No
February 06, 2008 23:25:11   #3  
g_sidhu Member Since: August 2007   Contribution: 122    

RE: What is the difference between single quote (') and double quote(") in relates to using in SQL. When do you use 'xxx' and "xxx"? what is the difference both of them?

Date and character literals must be enclosed within single quotation marks (' ');

If a column alias contains a space it should be enclosed in double quotation marks.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape