当前位置:Gxlcms > mysql > mysql-MySQL数据导入到同数据库的另一张不存在的表,请教我写的有什么问题,创建表的时候ID报错

mysql-MySQL数据导入到同数据库的另一张不存在的表,请教我写的有什么问题,创建表的时候ID报错

时间:2021-07-01 10:21:17 帮助过:80人阅读

mysql数据库

CREATE TABLE IF NOT EXISTS PJM_PROJECT_GROUP
(
'PJM_PROJECT_GROUP_ID' VARCHAR(32) ,
'CATEGORY_ID' VARCHAR(32) ,
'RZ_ORG_ID' VARCHAR(32) ,
'DB_ORG_ID' VARCHAR(32) ,
'ORG_AGENT_ID' VARCHAR(32),
'TITLE' VARCHAR(128) ,
'CODE' VARCHAR(15) ,
'MONEY' DECIMAL(16,2) ,
'CONTRACT_URL' VARCHAR(128) ,
'INVEST_LOWEST' DECIMAL(16,2) ,
'INVEST_ADD' DECIMAL(16,2) ,
'MIN_INCOME' DECIMAL(16,2) ,
'MAX_INCOME' DECIMAL(16,2) ,
'TYPE' CHAR(4) ,
'REPAY_TYPE' CHAR(4) ,
'SITE_FEE' DECIMAL(16,2) ,
'STATUS' CHAR(10) ,
'CREATE_STAFF_ID' VARCHAR(32) ,
'CREATE_TIME' DATETIME ,
'UPDATE_STAFF_ID' VARCHAR(32) ,
'UPDATE_TIME' DATETIME ,
'CHECK_STAFF_ID' VARCHAR(32) ,
'CHECK_STAFF_ID' DATETIME ,
)
CREATE PROCEDURE dataShift()
BEGIN
INSERT INTO PJM_PROJECT_GROUP('PJM_PROJECT_GROUP_ID','CATEGORY_ID','RZ_ORG_ID','DB_ORG_ID','ORG_AGENT_ID','TITLE','CODE','MIN_INCOME','MAX_INCOME','TYPE','REPAY_TYPE','SITE_FEE')
SELECT PROJECT_ID,CATEGORY_ID,RZ_ORG_ID,DB_ORG_ID,ORG_AGENT_ID,TITLE,CODE,YEAR_INCOME,YEAR_INCOME,LOAN_TYPE,REPAY_TYPE,SITE_FEE
FROM PJM_PROJECT
END

CALL dataShift()

错误信息:[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''PJM_PROJECT_GROUP_ID' VARCHAR(32) ,
'CATEGORY_ID' VARCHAR(32) ,
'RZ_ORG_ID'' at line 3

人气教程排行