In SQL INSERT INTO Command add the new record (row) in a table. You can insert the data with the help of INSERT INTO command in two ways.
First way is inserting the data in all Column. In this way it is not necessary to specify the column name, just give the value.
Syntax is :
INSERT INTO table-name
Values(value1, value2...........) ;
Second way is inserting the data in specified Columns. In this way you must specify the column name and then give the value to that column.
Syntax is :
INSERT INTO table-name (Column1 , Cooumn2........)
Values(value1, value2...........) ;
For example:
if you have table Name "student " with the following column:
Rno (integre)
Name (VARCHAR (20))
Address ( (VARCHAR (20))
Then you can insert the record in this table with following statement:
INSERT INTO Student
VALUES(101, 'Qasim', 'DIKHAN')
If you want to Insert the value in specified column for example only in Rno column, and Name column:
INSERT INTO Student (Rno , Name)
VALUES(101, 'Qasim')
Remember all the string value must enclose in single quotation marks.
Select Command
Distinct clause with Select Command
Where clause In SQL
Logical Operator in SQL SELECT Statement
IN Operator in SQL
BETWEEN Operator in SQL
Use of Wildcards in SQL
LIKE Operator in SQL
ORDER BY Clause in SQL
GROUP BY Clause in SQL
HAVING Clause in SQL
ALIAS In SQL
AS Keyword In SQL
INSERT INTO Command In SQL
Inserting Record In to a Table Form an other Table In SQL
UPDATE Command in SQL
DELETE Command in SQL
AVG Function in SQL