I have created a table (RJY) with default value to one of its column. When I enter the command ‘Describe rjy;’ its shows me default column with the value I gave,
when I insert data into my table using insert command, the column with default value is left blank and it is not taking the value which I gave. Below is my query please solve it.
mysql> insert into rjy (compy_id, reqrmnt, veh_type, go_type, weigh, l_start,l_end)
values ('123456', '111', '12 ty', 'white cemt', '1 tons', '', 'mumbai');
Here I gave default value to “l_start” field
Thank you.
Well, you give your field a value in the insert query (even it’s it an empty value).
To have default value, you should change your insert as