create trigger person_update on person for update as if @@rowcount=0 return update p…
SQl 源代码
结构化查询语言(StructuredQueryLanguage)简称SQL,是一种特殊目的的编程语言,是一种数据库查询和程序设计语言,用于存取数据以及查询、更新和管理关系数据库系统。
create table paydata.dbo.person1 ( no char(6) not null primary key, name char(10) not null, sex char(2…
alter table dept drop constraint pri_deptno
use master create database pay on (name=pay1 ,filename='c:\Program Files\Microsoft SQL Server\…
create trigger person_update on pay for update as declare @num_rows int select @num_rows=@@rowco…
select person.*,year,month,fact from pay,person where pay.no=person.no and deptno='00102' order by fact desc
create function fun_checkno(@pno char(6)) returns integer as begin declare @num int if exists (select …
alter table pay drop constraint fk_no
select no,fact1=base*1.5+bonus-deduct from pay where no='000001'
sp_addtype d_no,'char(2)','not null' go create table dept1 (deptno d_no, deptname varchar(10) not null)