CRUD Statements  «Prev 

Issue Insert Information in SQL-Server

Punctuation in SQL

1) SS has asked you to update Anthony Mann with new salary information, and you issue the <tt>INSERT</tt> statement shown above.

2) Notice that the literal values for FirstName and LastName are enclosed in quotes (single quotes to be exact), whereas the literal value for Salary is not. This is because SQL Server requires quotations for the character datatype, but not for the money datatype.

3) Next, note that the literal value for Salary does not have a dollar sign. This is because punctuation is necessary with literal values only when its omission will change the definition of the value, such as with a decimal. It is important to only use necessary punctuation with literal values.