嘿伙计们我正在尝试创建一个存储过程,我从loan_table输入Loan_ID并将其移动到另一个名为loan_history的表中。我不确定我做错了什么。我得到的错误是'找不到与列列表匹配的FULLTEXT索引'
CREATE PROCEDURE `INSERT_INTO_lOAN_HISTORY`(in INSERT_LOAN_ID INT(11))
INSERT into loan_history
SELECT *
FROM `loan_table`
Where MATCH (LOAN_ID) AGAINST (INSERT_LOAN_ID)
CREATE TABLE loan_table
( Loan_ID int(11) NOT NULL AUTO_INCREMENT,
Member_ID int(11) DEFAULT NULL,
Item_ID int(11) DEFAULT NULL,
Book_ID varchar(45) DEFAULT NULL,
Video_ID varchar(45) DEFAULT NULL,
Transaction_Date date DEFAULT NULL,
Due_date date DEFAULT NULL,
etc
答案 0 :(得分:0)
对于其他用户和将来的参考,解决方案是删除MATCH并将WHERE条件更改为ID等于IN参数中的ID值。
CREATE PROCEDURE `INSERT_INTO_lOAN_HISTORY`(in INSERT_LOAN_ID INT(11))
INSERT into loan_history
SELECT *
FROM `loan_table`
WHERE Loan_ID = INSERT_LOAN_ID