select person.*,year,month,base,bonus,deduct,fact from person,pay where person.no=pay.no and year=2005 and month…
SQl 源代码
结构化查询语言(StructuredQueryLanguage)简称SQL,是一种特殊目的的编程语言,是一种数据库查询和程序设计语言,用于存取数据以及查询、更新和管理关系数据库系统。
alter table person add constraint uni_noname unique(no,name)
create trigger person_insert on pay for insert as declare @num_rows int select @num_rows=@@rowco…
update pay set base=base+200 where no='000005' update pay set base=1850 where no='000006'
alter table person drop fk_deptno alter table person add constraint fk_deptno foreign key(deptno) refer…
sp_grantlogin 'workgroup\guest05'
delete pay where no='000006'
create view dbo.view_person(no,name,sex,professor,deptno) as select no,name,sex,professor,deptno from dbo.pe…
select* from person where no in(select no from pay where year=2005 and month=1 and …
alter table dept add constraint pri_deptno primary key(deptno)