'ABC'
'123'
The example above contains separate strings within each pair of single quotes. However, there is a case in the string that also contains an apostrophe. For example:
'quantrimang.com is very great! It's my favorite site! '
In this example, the string contains an apostrophe in the word It. This single quotation mark makes the break statement in the second parenthesis as follows:
'quantrimang.com is very great! It '
To resolve this error to avoid subsequent commands, you need to add a similar single quotation mark to escape from it:
'quantrimang.com is very great! It''s my favorite site! '
Integer constants include negative integers and positive integers, not including decimals. If you don't specify a specific marker, the program will default to your constant as positive. Representing valid integer constants is as follows:
2018
+2018
-2018
The real constant includes negative integers, positive integers and even decimal numbers. If you don't specify a specific marker, the program will default to your constant as positive. Representing valid real constants is as follows:
2018,11
+2018,11
-2018,11
Time value constant is always placed in single quotes, represented as follows:
'November 06, 2018'
'2018/11/06'
'2018/11/06 12:24:48'
Previous article: Use annotations in SQL Server
Next article: Declaring variables in SQL Server