sql

ALTER TABLE `tourdays` DROP FOREIGN KEY `FK_Tour_TO_TourDays_1`;

PlaidMoon 2025. 2. 5. 11:21

 

ALTER TABLE 'tourdays' DROP FOREIGN KEY 'FK_Tour_TO_TourDays_1';

SQL Error [1064] [42000]: (conn=62) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''tourdays' drop foreign key 'FK_Tour_TO_TourDays_1'' at line 1

 

수정 후 :

ALTER TABLE `tourdays` DROP FOREIGN KEY `FK_Tour_TO_TourDays_1`;

 

❤  SQL에서는 테이블명과 제약조건명을 백틱(`) 또는 그냥 적어야 함

❤   작은따옴표(')는 문자열 리터럴에만 사용