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...

Select Statement in SQL

Select Statement in SQL Select statement is most used command in SQL. It is used to fetch data from table and display data in tabular form. The syntax of select statement is: SELECT *FROM Table_Name; Suppose we have a below EMP table Emp_ID Emp_Name Emp_Age Emp_Salay 1 Mohan 25 25000 2 Rakesh 25 25000 3 Ram 25 25000 Now we have above table which is already created and now we want to fetch all table data from above table so for this we use below Select statement to retrieve SELECT Statement to retrieve Data from EMP table: SELECT *FROM EMP ; Now after executing this command , the output will be : Emp_ID Emp_Name Emp_Age Emp_Salay 1 Mohan 25 25000 2 Rakesh 25 25000 3 Ram 25 25000

What is usability testing ?

What is usability testing ? Usability testing is a way to see how system is easily usable by the end users. It basically verifies the interface of website and test whether application is user friendly or not. It identifies how the customer will feel comfortable in using the software. Usability Testing not only test Look and feel it also test in how many steps customer will reach their goals Example: Suppose there is an application in which user wants to generate Attendance Report of Employees on daily basis, and user has to follow below steps: 1) Login to Application. 2) Click on Attendance System 3) Click on Reports and select Employee Attendance Report 4) Various Employee Attendance reports will be displayed of different teams. Select particular report(say: Select Team) 5) Select the parameters which you want to display in report say: • Date • Shift Timings • Employee Id • Name • In/Out Time • Status (Present/Absent/leave) 6) Click on Generate Report 7) Click on Print option In this ...