Error Code: 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 'if exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id =' at line 1
/*==============================================================*/
/* DBMS name: Microsoft SQL Server 2005 */
/* Created on: 2015/5/17 22:54:34 */
/*==============================================================*/
(提示错误)if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('sname') and o.name = 'FK_SNAME_RELATIONS_班级')
alter table sname
drop constraint FK_SNAME_RELATIONS_班级
go
if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('专业方向') and o.name = 'FK_专业方向_RELATIONS_院系')
alter table 专业方向
drop constraint FK_专业方向_RELATIONS_院系
------解决思路----------------------
贴出来的语句没有错误
------解决思路----------------------
拿 SQL Server 脚本到 MySQL 运行?
------解决思路----------------------
拿 SQL Server 脚本到 MySQL 运行?