I have created a table named 'students'. It has following fields :
roll_no <- type:Integer Not Null,
course_name <- type:varchar(40) Not Null,
std_surname <- type:varchar(40) Not Null,
std_firstname <- type:varchar(40) Not Null,
emailid <- type:varchar(40) ,
address <- type:varchar(40) Not Null,
income <- type:Integer,
gender <- type:varchar(10) Not Null,
experience <- type:Integer,
in the above fields mentioned some accept null values and most of them don't accept null values or null values are not allowed.
What I want to do is I want to insert some information or data into the columns that do not accept null values and then I want to insert remaining data into the remaining columns later. How can I achieve this?
More specifically how can I insert only few data into specific fields in a record at a time using insert query leaving other fields empty and then insert remaining field values like email or experience ???
Please help me with this problem?
Insert into selected fields
for ex
INSERT INTO
students
(roll_no, course_name, dob, gender)
VALUES
(111, 'MBA', '1991-01-01', 'F');
for inserting NULL values, have a look at
Insert NULL value into INT column
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With