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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -