is it possible to do 1 sql statement (insert) which you duplicate one of the inserting value from another table and another value you hard code? for eg, profilepic, i want to duplicate the value from another table data. As for displayname, i would like to hard code. This is my sql statement:
insert into registration (profilePic, displayname)
values ( (select profilePic from registration where userId = 143), 'abc' );
Error message from mysql :
Error code:1093. You can't specify target table 'registration' for update in from clause.