-2
我試圖將以下sql命令上傳到php myadmin。但是,我有一些有趣的錯誤。我試圖解決它,但即使我仔細考慮,我也找不到錯誤發生的原因。php myadmin sql 1064觸發器錯誤
錯誤:
MySQL said: Documentation
#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 'ON car_model
FOR INSERT
AS
declare @car_name VARCHAR(255)' at line 2
SQL:
CREATE TRIGGER TRG_Update
ON car_model
FOR INSERT
AS
DECLARE @car_name VARCHAR(255);
DECLARE @manufacturer_year VARCHAR(255);
DECLARE @car_type VARCHAR(255);
SELECT @car_name = i.car_name FROM inserted i;
SELECT @manufacturer_year = i.manufacturer_year FROM inserted i;
SELECT @car_type = i.car_type FROM inserted i;
INSERT INTO features
(car_name, manufacturer_year, car_type)
VALUES (@car_name, @manufacturer_year, @car_type);
GO
你能完全寫完整的代碼校正?我已經做了你寫的東西,但仍然是同樣的錯誤。 – demilg 2013-03-24 11:10:06
這就是整個代碼,你不需要聲明任何變量。什麼是完整的錯誤信息生成? – 2013-03-24 11:11:23
它說你沒有權限做這份工作。這是什麼,我怎樣才能解決它在PHP myadmin? – demilg 2013-03-24 11:26:07