Insert Command

Insert command is used to insert data into database. There are many ways to insert data using insert command and these are following:-

Take table employee having two columns Emp_id and Emp_name

Simple Inserting command

		
		insert into Employee values('3','priya');
		insert  Employee values('6','isha');
		
		

Insert command using column name

		
       insert into employee(emp_id,emp_name) values('10','sapna');
	   insert  employee(emp_id,emp_name) values('11','sapna');
		
		

Insert command in which we select records from another table

		
		insert employee1 select * from Employee;
		insert into employee1 select * from Employee;
		
		

Insert multiple records in single insert command

		
insert into employee(emp_id,emp_name)
select 12,'neha'
union all
select 13,'saloni';

		
		
		
insert into employee(emp_id,emp_name) values
(14,'rahul'),
(15,'avinash'),
(16,'abhinav');