CREATE TRIGGER trg_alis AFTER INSERT ON alis_acik_emirler
FOR EACH ROW
BEGIN
DROP TABLE alis2;
CREATE TABLE alis2 (
emirID int NOT NULL AUTO_INCREMENT,
userID int,
fiyat int,
adet int,
doldurulan_adet int,
kalan_adet int,
market_tipi int,
PRIMARY KEY(emirID)
);
END;
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 ''DROP TABLE alis2'' at line 6
I can't drop table inside trigger. How can I do it?
DROP TABLE IF EXISTS alis2;
I tried this but it doesn't work.