我想通过SQL Fiddle分享我的SQL Server代码。但我似乎无法创建我的架构。我可以创建没有问题的MySQL表,但是当我切换到SQL Server设置时,某些东西不会合作。我现在在互联网上看了将近一个小时。有人可以直接引导我吗?
以下是我试图制作的表格:
create table employee
(
empnum char(3) primary key,
empname varchar(15),
empphone char(4)
)
GO
insert into employee values('123', 'andrew', '1234')
insert into employee values('124', 'andy', '1221')
insert into employee values('125', 'andre', '1344')
GO
我一直在:
创建脚本错误
谢谢。
答案 0 :(得分:0)
感谢您的答案,SQL Fiddle目前遇到MS SQL Server代码问题。我想我会通过Dropbox链接分享它。制作临时表子堆栈交换的工作,但我必须按ctrl + h表名的每一个实例...
糟糕。我希望我没有花一个小时在这上面挣扎。谢谢你的帮助。
答案 1 :(得分:0)
我看到这是一篇旧帖子,但是在MySQL和SQL Server中都有与上面的示例代码相同的问题。但是,我能够成功运行以下内容:
create table employee
(
empnum char(3) primary key,
empname varchar(15),
empphone char(4)
);
insert into employee values('123', 'andrew', '1234');
insert into employee values('124', 'andy', '1221');
insert into employee values('125', 'andre', '1344');
希望这能节省一些时间。 http://sqlfiddle.com/#!6/5649a