第一个消息很明显:
和第二个语句:
create procedure AddLesn @lesn int
as
alter table StuGrd
add @lesn int null
go
只能作为批量语句中的第一句来执行,就是不能放在use student1
之后...//创建存储过程、或创建视图、或创建触发器语句块在批量语句中必须作为第一句.
和第二个语句:
create procedure AddLesn @lesn int
as
alter table StuGrd
add @lesn int null
go
只能作为批量语句中的第一句来执行,就是不能放在use student1
之后...//创建存储过程、或创建视图、或创建触发器语句块在批量语句中必须作为第一句.
1.
use student12.
create procedure AddLesn @lesn int
as
alter table StuGrd
add @lesn int null
as
alter table StuGrd
add @Lesn int null
服务器: 消息 170,级别 15,状态 1,过程 AddLesn,行 4
第 4 行: '@Lesn' 附近有语法错误。
哪个地方错了?
create procedure AddLesn
(
@Lesn nvarchar(20)
)
as
alter table StuGrd
add @Lesn int null