mysql存储过程小问题


之前一条存储过程中执行的sql语句
INSERT INTO frist.tblSearchInfo (keyword, request_number, request_time) SELECT keyword, request_number, last_request_time FROM frist.tblHotKeyword WHERE last_request_time < now() AND last_request_time > date_sub(now(), interval 3 hour) LIMIT 10;
现在我想在插入的时候多插一个aaa字段,但是这个字段值并不想从select中查出来,是写死的值,这条语句如何改装呢,是否能实现?

mysql 存储过程

msz006 11 years, 11 months ago
   
  INSERT INTO frist.tblSearchInfo (keyword, request_number, request_time, aaa) SELECT keyword, request_number, last_request_time, "写死的值" FROM frist.tblHotKeyword WHERE last_request_time < now() AND last_request_time > date_sub(now(), interval 3 hour) LIMIT 10;
 

爆炸头光波 answered 11 years, 11 months ago

Your Answer