yanhong ye wrote:
>> insert into table3(name,mark,mdate) select name,mark,now() from table2
>> where  table2.name=table1.name;
>
> Not work, I don't know what's problem.

Did you actually read the error messages?

sqlite> create table table1(name);
sqlite> create table table2(name,mark);
sqlite> create table table3(name,mark,mdate);
sqlite> insert into table3(name,mark,mdate) select name,mark,now() from table2
   ...> where  table2.name=table1.name;
Error: no such function: now
sqlite> insert into table3(name,mark,mdate) select name,mark,current_timestamp 
from table2
   ...> where  table2.name=table1.name;
Error: no such column: table1.name

You have to add table1 to the FROM clause, if you want to have a join.
Or not.  Maybe you should execute "DROP TABLE table2;".  It's impossible
to know without you telling us what problem you want to solve.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to