Insert multiple rows T-SQL

DML statement - insert

To create a new table you need to use create table command and define the columns of the table. A column need name, data type and size.

Insert multiple rows using single insert statement

USE model;
GO
insert into Customers(id,Name,City)
values
(1,'William','New York'),
(2,'Donna','San Jose'),
(3,'Michelle','Boston'),
(4,'Jason','San Antonio')
GO

Insert multiple rows using select statement

USE model;
GO
insert into Students_Math(id,Name,City)
select ID, Name, City from Students where id in (3,4);
GO

Insert multiple rows using select union all

USE model;
GO
insert into Students_Math(id,Name,City)
select ID, Name, City from Students where id = 2
union all
select ID, Name, City from Customers where id = 4
GO