SQLConfiguration SQLConfiguration


CRUD Statements  «Prev 

Issue Insert Information in SQL-Server

Punctuation in SQL

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

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.

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.