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

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -