mysql - how to insert a new value along with other values from table 1 to table 2 by using triggers -


delimiter $$ create trigger after_status_added  after insert on user_status each row  begin    insert all_post_status            values(new.status_id,new.friend_id,new.status_time_date, abc); end$$ delimiter ; 

now want insert value 'abc' value in field "user_type" of all_post_status table . how

there new in insert triggers - newly inserted record.

http://dev.mysql.com/doc/refman/5.0/en/trigger-syntax.html


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -