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

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -