mysql - How to insert into TABLE1 (field1,field2 'value','myval','currentdate') select(field1,field2) from TABLE2 -


i want insert value table2 (2 field) table1 (containing 5 field).

when execute query:

insert table1  select (field1, field2) table2  

my rest 3 fields became null.

i want insert new value current date , new id in table1.

how it?

thanks in advance

try this

insert table1 (field1,field2 'value','myval','currentdate') select field1,field2,'your value','other value',now() table2 

Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -