+ 3
Can I insert multiple records in table by one query in SQL ?
9 Respuestas
+ 7
Yes, sure. You could use the following code:
Insert into ... (...) values (your first record), (your second record), and so on. After the last bracket you should use the semicolon.
+ 5
sure..insert into tablename values(1,'john'),(2,'randy'),(3,'goldberg').......we can insert multiple records by using comma(,) between rows.
+ 3
Sure just split them by using a brackets and a ","
+ 2
yes, you can make with INSERT INTO query.
+ 2
yes, sure
+ 1
Yes you can.
+ 1
yes using comma,&brackets and finally semicolons to close
+ 1
yes of course by using this query insert into table name values(add values in the same order),(add values in the same order);
0
here's a handy trick.
if you have data in one table and what to insert into another table such as a temp table you can do
insert into [tableName] ([colName],[colName]..)
select colName, colName.. from tableName where..