+ 1

skip column name

i have a table of column names are id,name,age,salary. if i use INSERT INTO statement is it possible to write INSERT INTO table name(id,name,salary) VALUES(8,'Akon',20000); here i skip column Age in inserting statement,is it possible? if so what can be the value in the Age ?

4th Jun 2020, 2:32 PM
Pranav Kp
Pranav Kp - avatar
1 ответ
0
Hey Pranav Kp you can go this way: INSERT into table_name(id,name,salary) VALUES(null,'pranav',50000); Or else INSERT into table_name(id,name,salary) VALUES (DEFAULT,'paranav',60000); If it allows null you can use first one or else use second syntax to avoid entry into one column.
5th Jun 2020, 6:22 PM
Nikhil Maroju
Nikhil Maroju - avatar