Skip to main content

Insert multiple row values in SQL table

Insert multiple row values in SQL table

In this post, you will learn how to insert values in table by using INSERT Command.

INSERT command is used to insert values in Table of your database. By using INSERT statement you can easily add value in your table:

Syntax of INSERT statement:

INSERT INTO Table_Name
( Column1, Column2, Column3....) 
Values(values1, values2, values3 ....etc),
(values1, values2, values3 ....etc),
(values1, values2, values3 ....etc),
(values1, values2, valuesn ....etc)

Here first you need to use INSERT INTO command and then you need to specify table name in which you want to add values.

Then you need to specify column name and then need to mentioned values based on datatype.

Now lets see an example: I'm going to insert value in EMP table

Emp_ID
Emp_Name
Emp_Age
Emp_Salay

Insert values in EMP table:

INSERT INTO EMP
(Emp_ID, Emp_Name, Emp_Age, Emp_Salary)
Values (1, 'Mohan', 25, 25000),
(2, 'Rakesh', 25, 25000),
(3, 'Ram', 25, 25000);


After executing this command, you will see result like:

Emp_ID
Emp_Name
Emp_Age
Emp_Salay
1
Mohan
25
25000
2
Rakesh
25
25000
3
Ram
25
25000

Note: By using INSERT command you can add values into table but if you want to change existing value in table, you can use UPDATE command.

Popular posts from this blog

How to analyze a JMeter summary report?

  A  Jmeter  Test Plan must have listener to showcase the result of performance test execution. Listeners capture the response coming back from Server while Jmeter runs and showcase in the form of – tree, tables, graphs and log files. It also allows you to save the result in a file for future reference. There are many types of listeners Jmeter provides. Some of them are: Summary Report, Aggregate Report, Aggregate Graph, View Results Tree, View Results in Table etc. Here is the detailed understanding of each parameter in Summary report. By referring to the figure: Label : It is the name/URL for the specific HTTP(s) Request. If you have selected “Include group name in label?” option then the name of the Thread Group is applied as the prefix to each label. Samples : This indicates the number of virtual users per request. Average : It is the average time taken by all the samples to execute specific label. In our case, the average time for Label 1 is 942 milliseconds & to...

Software Testing Interview Question for beginners and experienced

 Software Testing Interview Question for beginners and experienced Software Testing Interview Question for beginners and experienced- software testing interview questions INTERVIEW QUESTIONS Project specific Questions 1. What was the duration of your project? 2. Explain about your project. 3. How many testers were their on this project. 4. According to you which was the complex part of the project from testing point of view. 5. How did you do the testing of your project? 6. How many test cases have you designed? How many you wrote in a day? 7. How many bugs did you find? 8. Tell me any high Severity bugs that you found. 9. What happens when the client changes requirements? 10. Which tool you used for defect reporting? 11. What is the database used for your project. 12. In which technology this application is developed? Company specific Questions 1. Where are you working currently? 2. How that Seed has sent you here for an interview when you are working in the same company. 3. Where...

Tic Tac Toe game in Python

  It’s no doubt, you must have played Tic Tac Toe in your school days and every one of us loves to play the game. You will be surprised to know that the game of Tic Tac Toe is known to exist since ancient Egypt times. With this Python project by TechVidvan, we are going to build an interactive game of Tic Tac Toe where we’ll learn new things along the way. What is Tic Tac Toe? Tic Tac Toe is one of the most played games and is the best time killer game that you can play anywhere with just a pen and paper. If you don’t know how to play this game don’t worry let us first understand that. The game is played by two individuals. First, we draw a board with a 3×3 square grid. The first player chooses ‘X’ and draws it on any of the square grid, then it’s the chance of the second player to draw ‘O’ on the available spaces. Like this, the players draw ‘X’ and ‘O’ alternatively on the empty spaces until a player succeeds in drawing 3 consecutive marks either in the horizontal, vertical or di...