如何在MYSQL中从另一个表插入数据?

时间:2018-11-12 17:53:21

标签: php mysql codeigniter

我已经尝试过很多次了。

INSERT INTO `64_point_details` ('user_id','purchase_point','date')
SELECT `user_id`,`amount`/.40,`date_insert` FROM `64_income_details` 
WHERE `commission_type` LIKE 'self_purchase_price' AND `date_insert` >= '2018-11-01 00:00:00'

但是我收到这样的错误

  #1064 - You have an error in your SQL syntax; 
  check the manual that corresponds to your MariaDB server version for the 
  right syntax to use near ''user_id','purchase_point','date')
  SELECT `user_id`,`amount`/.40,`date_insert` ' at line 1

我该如何解决

0 个答案:

没有答案