简体   繁体   中英

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. I'm unsure on what I'm doing wrong. The error I'm getting is 'Can't Find FULLTEXT index matching the column list'

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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