0
if I have 4 columns say id , name , address and zip and if I use query like - Insert into (name,id) Values ('suraj',8) then it will work ?
3 Antworten
+ 5
It will work, as long as the columns Address and Zip allow Null values in the table definition, and you don't have any other constraints or restrictions (e.g. a foreign key).
+ 2
to supplement the excellent answer of michael: yes. The values that you didn't fill in (adress, zip) will be filled with NULL
(or, given the fact you created your table this way, with different default values e.g. incremental values).
+ 2
you can use either: ('suraj',8,'','') or ('suraj',8,'NULL,'NULL')