
Inserting multiple rows in a single SQL query? - Stack Overflow
Jan 17, 2009 · In SQL Server 2008 you can insert multiple rows using a single INSERT statement.
sql - How to insert a value that contains an apostrophe (single …
Dec 16, 2009 · The apostrophe, or single quote, is a special character in SQL that specifies the beginning and end of string data. This means that to use it as part of your literal string data …
sql - Insert into ... values ( SELECT ... FROM ... ) - Stack Overflow
Aug 25, 2008 · 1896 I am trying to INSERT INTO a table using the input from another table. Although this is entirely feasible for many database engines, I always seem to struggle to …
How do I escape a single quote in SQL Server? - Stack Overflow
Oct 19, 2009 · I am trying to insert some text data into a table in SQL Server 9. The text includes a single quote '. How do I escape that? I tried using two single quotes, but it threw me some …
SQL Server INSERT INTO with WHERE clause - Stack Overflow
I'm trying to insert some mock payment info into a dev database with this query: INSERT INTO Payments(Amount) VALUES(12.33) WHERE Payments.CustomerID = '145300'; How can …
sql - Using the WITH clause in an INSERT statement - Stack Overflow
The problem here is with your INSERT INTO statement, which is looking for VALUES or SELECT syntax. INSERT INTO statement can be used in 2 ways - by providing VALUES explicitly or by …
SQL Server Insert if not exists - Stack Overflow
A single insert statement is always a single transaction. It's not as if the SQL Server evaluates the subquery first and then at some later point, and without holding a lock, goes on to do the insert.
sql - How to insert a string which contains an "&" - Stack Overflow
Sep 30, 2008 · 54 How can I write an insert statement which includes the & character? For example, if I wanted to insert "J&J Construction" into a column in the database. I'm not sure if …
SQL Server - Return value after INSERT - Stack Overflow
INSERT INTO table (name) VALUES('bob'); Now I want to get the id back in the same step. How is this done? We're using Microsoft SQL Server 2008.
Generate sql insert script from excel worksheet - Stack Overflow
May 29, 2013 · I have a large excel worksheet that I want to add to my database. Can I generate an SQL insert script from this excel worksheet?