mysql - inserting default value along with other columns -
hi in case need insert 2 columns in table 1 column has default value 'other'(please don't suggest put other default value) , other column should inserted different table. sample code please suggest necessary change:
insert table1 (`id`,`specialty`) select `id`,`here need put default value other` table2 id not null
do mean this?
insert table1 (id,specialty) select id, 'other' table2 id not null
Comments
Post a Comment