我的表与图书有关,我想查找特定列中特定条件中有多少记录
{DELIMITER $$
CREATE TRIGGER No_of_Publisher_year After Insert ON Books FOR EACH ROW Set @Count_NO=@Count_NO + New.Copyright Begin
SELECT Count(@Count_NO) AS 'No_of_publisher_in_year_2007' FROM Books WHERE Copyright=2007;
END; $$
DELIMITER ;}
我收到错误:
1064 - 您的SQL语法出错;查看与您的MySQL服务器版本对应的手册,以便在#SELECT; SELECT Count(@Count_NO)AS' No_of_publisher_in_year_2007' No_of_publisher_in_year_2007'来自书籍WHERE Copyr'在第2行