user11119334
user11119334

Reputation:

SQL Single quote and double quote inserting values

Im trying to create a table and insert this value here:

("Where I'm Calling From: Selected Stories", 'Raymond', 'Carver', 1989, 12, 526),

Im having an issue with using single and double quotes. How would I amend this ? and what should I keep in mind for future?

Using Microsoft SQL Server management 2014

Upvotes: 1

Views: 2558

Answers (2)

Derviş Kayımbaşıoğlu
Derviş Kayımbaşıoğlu

Reputation: 30585

double quotes cannot be used for insert. use single quotes. you can use single quotes twice for escaping. ''

insert into .... values 
 ('Where I''m Calling From: Selected Stories', 'Raymond', 'Carver', 1989, 12, 526)

Upvotes: 1

DanB
DanB

Reputation: 2124

Always use single quote, and double single quote when needed.

('Where I''m Calling From: Selected Stories', 'Raymond', 'Carver', 1989, 12, 526)

Upvotes: 2

Related Questions