Questions tagged [multiple-insert]

Use this tag for questions about inserting multiple rows in a single statement into an SQL database.

Multiple row inserts are a feature of many SQL databases. They're a feature of the SQL-92 standard.

The most common syntax for multiple row inserts is similar to a normal INSERT INTO statement, but with multiple value groups separated by comma's

INSERT INTO MyTable(Value1, Value2)
VALUES 
    ('Value1Row1', 'Value2Row1'), 
    ('Value1Row2', 'Value2Row2'),
    ('Value1Row3', 'Value2Row3')

Alternatively, multiple row inserts can be achieved by using an INSERT INTO ... SELECT statement and UNION queries in many RDBMS.

For more information, see Wikipedia on multi-row inserts.

81 questions
-1
votes
1 answer

multiple insert textarea with php

I cannot input data in the table mysql. I mean for this code use to insert multiple data textarea in mysql using php, I'm using wordpress so I should use prefix or please give me another code that works. I usually enter the data more than 20 in a…
-1
votes
4 answers

SQL - Insert multiple records from select

I have been searching all day but could not find answer to this: I have a table on SQL Server: dbo.Program with fields: Program.id...PK…
-1
votes
1 answer

Insert, update or delete in multiple row form

I need to known how can I make a INSERT, UPDATE or DELETE in multiple rows if in the invoice form I make some changes in products like edit one, delete others or add new ones with one query... I tried with the update but if I delete one or two…
user3236149
  • 167
  • 4
  • 16
-1
votes
2 answers

value of dropdown in codeigniter cannot be called

okay, maybe i made a mistake, but i don't know where. any of you can help me? here is my code. controller : site.php public function plus() { $modul = $this -> contact_model -> get_names_group(); …
-2
votes
3 answers

add mutiple rows in database php?

I want to insert many rows in database through loops.( $product,$size, $quantity, $uom, $target_price) columns of one row.how to insert these type of mutilpe rows in database.and data.how to use for loop or other loop to enter detail record agasint…
Rajo
  • 11
  • 6
-3
votes
2 answers

multiple insert data in one table

I have 120 student in 4 class A,B,C,D in student table : Id_student, Name, Class and I have a payment table: Id, Id_student, Class, Payment, Date_payment, Status How i asking how to insert All student in class A with status not_complete
1 2 3 4 5
6