使用set statistics on 来检查sql tuning的结果
在SQL Server2005/2008中可以使用一下四个命令来调优sql语句以及检查调优的结果
set
statistics time on
set
statistics IO on
set
statistics profile on
set
statistics xml on
相关文档:
1.条件控制
1.1 if .. then .. end if
if 条件 then
语句段;
end if;
1.2 if .. then .. else .. end if
if 条件 then
语句段;
else
语句段;
end if;
1.3 if嵌套
2.循环控制
2.1 loop .. exit .. end loop
loop
& ......
1.创建过程
create or replace procedure 过程名 as
声明语句段;
begin
执行语句段;
exception
异常处理语句段;
end;
2. 带参数的过程
参数类型3种
in参数:读入参数,主程序向过程传递参数值
out参数:输出参数,过程向主程序传递参数值
in out参数:双向参数
定义 ......
一个简单的小实例就明白~!
user表
在这张表中建立触发器
Create trigger tiggername
on user
for delete
as
begin ......
What is SQL*Plus and where does it come from?
SQL*Plus is a command line SQL and PL/SQL language interface and reporting tool that ships with the Oracle Database Client and Server software. It can be used interactively or driven from scripts. SQL*Plus is frequently used by DBAs and Developers ......