How can we insert five time values in only a sql query?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How can we insert five time values in only a sql query??

In just one query.

20th Oct 2019, 8:01 PM
Raju Ram Sau
Raju Ram Sau - avatar
5 Answers
+ 3
Check this. You can insert multiple rows in a single query like this INSERT INTO MyTable ( Column1, Column2, Column3 ) VALUES ('John', 123, 'Lloyds Office'), ('Jane', 124, 'Lloyds Office'), ('Billy', 125, 'London Office'), ('Miranda', 126, 'Bristol Office');
20th Oct 2019, 8:21 PM
A͢J
A͢J - avatar
+ 3
Exactly I want that answer AJ || ANANT || AC || ANANY || AY Thanks
20th Oct 2019, 8:42 PM
Raju Ram Sau
Raju Ram Sau - avatar
+ 2
Sorry dear But someone asked me this, that time I can't handle it. But now I just remember so I ask
20th Oct 2019, 8:17 PM
Raju Ram Sau
Raju Ram Sau - avatar
+ 2
We have a table that contains the columns firstName and email. Now someone is asked me that I have to insert one entry to the table and the value was firstName = John email = john@gmail.com so I was written the query Insert into user Values('john', 'john@gmail.com') After that he again ask me a another question related to this table. The question was that insert the 5 different entry using one query and the values was 1. Harry 2. Jess 3. Doe 4. Hanry 5. Sui The above entries for the firstName 1. Harry@gmail.com 2. jess@gmail.com 3. doe@gmail.com 4. hanry@gmail.com 5. sui@gmail.com So what will be the one query for these entries? Sorry for grammatical mistake.
20th Oct 2019, 8:36 PM
Raju Ram Sau
Raju Ram Sau - avatar
+ 1
Let I explain to you just wait
20th Oct 2019, 8:18 PM
Raju Ram Sau
Raju Ram Sau - avatar