摘要:
create or replace procedure prc_get_sex (stuname student.name%type) as stusex student.sex%type; begin select sex into stusex from stud... 阅读全文
摘要:
declare cursor 游标名称 is 查询语句; begin --其他语句 end; 列子: declare cursor cur_stu is select name from student where id=2; sname student.n... 阅读全文
摘要:
ALTER TABLE Student --主键约束ADD CONSTRAINT PK_StuNo PRIMARY KEY (StudentNo)ALTER TABLE Student --唯一约束(身份证号唯一)ADD CONSTRAINT UQ_stuID UNIQUE (IdentityCar... 阅读全文
摘要:
use mastergoif exists(select * from sys.databases where name='MySchool') drop database MySchool --查看当前所要创建的数据库是否存在,有则删除之。go/*--案例:使用SQL语句创建数据库MySchool... 阅读全文