Insert 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);
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
Insert values in EMP table:
INSERT INTO EMP
(Emp_ID, Emp_Name, Emp_Age, Emp_Salary)
Values (1, 'Mohan', 25, 25000);
After executing this command, you will see result like:
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.
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
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