Saturday 14 September 2013

Insert


Insert;-it is used in sql for inserting the data in the table.entering the records in the table we use insert command.

Ex:-


in this we pass the values in same order as we mention at the time of creating the table.
first id second name and third age.
we must pass the string value in single inverted comma.
in the second insert statement  first we define the column and then we pass the value in same order.
in third insert statement we pass only id value.
in fourth insert statement we pass only salary.
so if you want to pass value only for 1 column we will use this insert statement .
in the last insert statement we pass the value for only two column.

o/p:-

those column in which we did not pass any value it automatically takes null value.




No comments :

Post a Comment