求高手翻一下语句~急急急
把下面的mysql语句改成sqlserver的,急急急
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for answers
-- ----------------------------
DROP TABLE IF EXISTS `answers`;
CREATE TABLE `answers` (
`id` int(10) unsigned NOT NULL auto_increment,
`generalsrid` varchar(255) default NULL,
`tid` varchar(255) default NULL,
`answer` varchar(255) default NULL,
`uid` varchar(255) default NULL,
`savetime` varchar(255) default NULL,
`total` varchar(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for kcfiles
-- ----------------------------
DROP TABLE IF EXISTS `kcfiles`;
CREATE TABLE `kcfiles` (
`id` int(10) unsigned NOT NULL auto_increment,
`filename` varchar(255) default NULL,
`filetype` varchar(255) default NULL,
`fileurl` varchar(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gb2312;
-- ----------------------------
-- Table structure for kechens
-- ----------------------------
DROP TABLE IF EXISTS `kechens`;
CREATE TABLE `kechens` (
`id` int(10) unsigned NOT NULL auto_increment,
`kename` varchar(255) default NULL,
`jianjie` varchar(255) default NULL,
`gangyao` varchar(255) default NULL,
`jiaochen` int(20) default NULL,
`tid` varchar(255) default NULL,
`rnum` int(20) default NULL,
`isPass` varchar(10) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gb2312;
-- ----------------------------
-- Table structure for news
-- ----------------------------
DROP TABLE IF EXISTS `news`;
CREATE TABLE `news` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(255) default NULL,
`picurl` varchar(255) default NULL,
`content` text,
`savetime` varchar(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gb2312;
-- ----------------------------
-- Table structure for notices
-- ----------------------------
DROP TABLE IF EXISTS `notices`;
CREATE TABLE `notices` (
`id` int(10) unsigned NOT NULL auto_increment,
`ntitle` varchar(255) default NULL,
`ncontent` varchar(255) default NULL,
`tid` varchar(255) default NULL,
`kid` varchar(255) default NULL,
`stime` varchar(255) default NULL,
`etime` varchar(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gb2312;
-- ----------------------------
-- Table structure for shitis
-- ----------------------------
DROP TABLE IF EXISTS `shitis`;
CREATE TABLE `shitis` (
`id` int(10) unsigned NOT NULL auto_increment,
`kechen` varchar(255) default NULL,
`zhangjie` varchar(255) default NULL,
`scontent` varchar(255) default NULL,
`stype` varchar(255) default NULL,
`answers` varchar(255) default NULL,
`fenzhi` varchar(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gb2312;
-- ----------------------------
-- Table structure for sysuser
-- ----------------------------
DROP TABLE IF EXISTS `sysuser`;
CREATE TABLE `sysuser` (
`id` int(10) unsigned NOT NULL auto_increment,
`uname` varchar(255) default NULL,
`upass` varchar(255) default NULL,
`utype` varchar(255) default NULL,
`tname` varchar(255) default NULL,
`sex` varchar(255) default NULL,
`tel` varchar(255) default NULL,
`email` varchar(255) default NULL,
`kid` varchar(45) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gb2312;
-- ----------------------------
-- Table structure for t_leaverword
-- ----------------------------
DROP TABLE IF EXISTS `t_leaverword`;
CREATE TABLE `t_leaverword` (
`id` int(11) NOT NULL auto_increment,
`mark` varchar(200) default NULL,
`type` varchar(20) default NULL,
`leaverName` varchar(20) default NULL,
`userId` varchar(20) default NULL,
`title` varchar(255) default NULL,
`time` datetime default NULL,
`answerContent` varchar(255) default NULL,
`reDate` datetime default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for taolun
-- ----------------------------
DROP TABLE IF EXISTS `taolun`;
CREATE TABLE `taolun` (
`id` int(10) unsigned NOT NULL auto_increment,
`content` varchar(255) default NULL,
`author` varchar(255) default NULL,
`pid` varchar(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gb2312;
-- ----------------------------
-- Table structure for tiwen
-- ----------------------------
DROP TABLE IF EXISTS `tiwen`;
CREATE TABLE `tiwen` (
`id` int(10) unsigned NOT NULL auto_increment,
`studentid` varchar(255) default NULL,
`answerid` varchar(255) default NULL,
`content` varchar(255) default NULL,
`pid` varchar(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gb2312;
-- ----------------------------
-- Table structure for zuoye
-- ----------------------------
DROP TABLE IF EXISTS `zuoye`;
CREATE TABLE `zuoye` (
`id` int(10) unsigned NOT NULL auto_increment,
`uid` varchar(255) default NULL,
`tid` varchar(255) default NULL,
`filename` varchar(255) default NULL,
`rfilename` varchar(255) default NULL,
`title` varchar(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gb2312;
[解决办法]
--SET FOREIGN_KEY_CHECKS=0; --主外键关系相关的表,LZ判断一下,先后删除即可.-- ------------------------------ Table structure for answers-- ----------------------------IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'answers' ) DROP TABLE answers; CREATE TABLE answers ( id int identity(1,1) not null primary key, generalsrid varchar(255) , tid varchar(255) , answer varchar(255) , uid varchar(255) , savetime varchar(255) , total varchar(255)) -- ------------------------------ Table structure for kcfiles-- ----------------------------IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'kcfiles' )DROP TABLE kcfiles;CREATE TABLE kcfiles ( id int identity(1,1) not null primary key, filename varchar(255) , filetype varchar(255) , fileurl varchar(255) ) -- ------------------------------ Table structure for kechens-- ----------------------------IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'kechens' )DROP TABLE kechens;CREATE TABLE kechens ( id int identity(1,1) not null primary key, kename varchar(255) , jianjie varchar(255) , gangyao varchar(255) , jiaochen int(20) , tid varchar(255) , rnum int(20) , isPass varchar(10) ,) -- ------------------------------ Table structure for news-- ----------------------------IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'news' )DROP TABLE news;CREATE TABLE news ( id int identity(1,1) not null primary key, title varchar(255) , picurl varchar(255) , content text, savetime varchar(255) ) -- ------------------------------ Table structure for notices-- ----------------------------IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'notices' )DROP TABLE notices;CREATE TABLE notices ( id int identity(1,1) not null primary key, ntitle varchar(255) , ncontent varchar(255) , tid varchar(255) , kid varchar(255) , stime varchar(255) , etime varchar(255) ) -- ------------------------------ Table structure for shitis-- ----------------------------IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'shitis' )DROP TABLE shitis;CREATE TABLE shitis ( id int identity(1,1) not null primary key, kechen varchar(255) , zhangjie varchar(255) , scontent varchar(255) , stype varchar(255) , answers varchar(255) , fenzhi varchar(255) ,) -- ------------------------------ Table structure for sysuser-- ----------------------------IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'sysuser' )DROP TABLE sysuser;CREATE TABLE sysuser ( id int identity(1,1) not null primary key, uname varchar(255) , upass varchar(255) , utype varchar(255) , tname varchar(255) , sex varchar(255) , tel varchar(255) , email varchar(255) , kid varchar(45) , PRIMARY KEY ( id ))-- ------------------------------ Table structure for t_leaverword-- ----------------------------IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 't_leaverword' )DROP TABLE t_leaverword;CREATE TABLE t_leaverword ( id int(11) NOT NULL auto_increment, mark varchar(200) , type varchar(20) , leaverName varchar(20) , userId varchar(20) , title varchar(255) , time datetime , answerContent varchar(255) , reDate datetime ) -- ------------------------------ Table structure for taolun-- ----------------------------IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'taolun' )DROP TABLE taolun;CREATE TABLE taolun( id int identity(1,1) not null primary key, content varchar(255) , author varchar(255) , pid varchar(255) ,)-- ------------------------------ Table structure for tiwen-- ----------------------------IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'tiwen' )DROP TABLE tiwen;CREATE TABLE tiwen ( id int identity(1,1) not null primary key, studentid varchar(255) , answerid varchar(255) , content varchar(255) , pid varchar(255) ) -- ------------------------------ Table structure for zuoye-- ----------------------------IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'zuoye' )DROP TABLE zuoye;CREATE TABLE zuoye ( id int identity(1,1) not null primary key, uid varchar(255) , tid varchar(255) , filename varchar(255) , rfilename varchar(255) , title varchar(255))