简体   繁体   English

MySQL将数据从一个表插入到另一个表-错误的FULLTEXT索引

[英]MySQL Inserting data from one table to another - error FULLTEXT index

Hey guys i'm trying to create a stored procedure where I enter in the Loan_ID from my loan_table and it moves it into another table called loan_history. 大家好,我正在尝试创建一个存储过程,在其中我从我的loan_table中输入Loan_ID并将其移动到另一个表中,该表称为loan_history。 I'm unsure on what I'm doing wrong. 我不确定自己在做什么错。 The error I'm getting is 'Can't Find FULLTEXT index matching the column list' 我收到的错误是“找不到与列列表匹配的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)

Schema 架构

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

For other users and future reference, the solution was to remove the MATCH and change the WHERE conditional to where the ID equals the ID value from the IN parameter. 对于其他用户和将来的参考,解决方案是删除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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM