SQL INSERT StatementThe SQL INSERT statement is used to insert a single or multiple data in a table. In SQL, You can insert the data in two ways:
Sample TableEMPLOYEE
1. Without specifying column nameIf you want to specify all column values, you can specify or ignore the column values. Syntax Query Output: After executing this query, the EMPLOYEE table will look like:
2. By specifying column nameTo insert partial column values, you must have to specify the column names. Syntax Query Output: After executing this query, the table will look like:
Note: In SQL INSERT query, if you add values for all columns then there is no need to specify the column name. But, you must be sure that you are entering the values in the same order as the column exists.Next TopicDBMS SQL Update |