Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
sql_server 217
t-sql 211
tsql 116
sqlserver 96
BRH 78
#SQLServer 66
#TSQL 56
SQL Server 34
function 11
SSMS 9

Archive · View All
August 2007 17
August 2010 8
June 2012 7
June 2011 7
November 2007 7
August 2012 6
May 2012 6
November 2011 6
August 2011 6
October 2011 6

Madhivanan's TSQL Blog

Understanding Single quotes

Feb 19 2008 12:49AM by Madhivanan   

This is for newbies who struggle to understand how single quotes work in SQL Server I have seen newbies worrying why the following doesnt work

 
SELECT columns from mytable where col ='Lifco's'

When you specify a value which has single quote, you need to double it

 
SELECT columns from mytable where col ='Lifco''s'

The following may be helpful (Run and see the result)

 
SELECT '','''','''''','''''''',''''''''''

When you use a static sql and express a value in a single quote then first and last sigle quotes specify that the value is a string. Then within those single quotes every double single quotes represent a single single quote When you use a Dynamic sql then first and last sigle quotes specify that it is a dynamic sql. Then within those single quotes every double single quotes specify that it is a string.Then within those single quotes every four single quotes represent a single single quote Run and see the result

 
EXEC('SELECT '''','''''''','''''''''''','''''''''''''''',''''''''''''''''''''')

Tags: t-sql, sql_server, single_quote,


Madhivanan
3 · 40% · 12862
1
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"Understanding Single quotes" rated 5 out of 5 by 1 readers
Understanding Single quotes , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]