易截截图软件、单文件、免安装、纯绿色、仅160KB

利用pl/sql执行本地的sql文件中的sql语句


功能:pl/sql执行本地的sql文件中的sql语句
说明:比如:e:\zhaozhenlong下有create_table.sql文件,则按如下方法执行:
步骤:
1、在pl/sql的command window下,
   或在windows的开始/'运行'下,sqlplus /nolog; connect cs@orademo;
2、执行:
@@e:\zhaozhenlong\drop_table.sql
@@e:\zhaozhenlong\create_table.sql
      
/*
说明:.sql文件名字中不能有空格,
      如create_table.sql是合法的,create table.sql是非法的。
文件内容:
drop_table.sql文件内容:
drop table tb_zhaozhenlong6;
drop table tb_zhaozhenlong5;
      
create_table.sql文件内容:
--drop table tb_zhaozhenlong5;
create table tb_zhaozhenlong5(
       c1 varchar2(10) not null constraint pk_zhaozhenlong5 primary key,
       c2 varchar2(10) not null , 
       c3 varchar2(10) not null constraint un_zhaozhenlong5 unique, 
       c4 char(1) not null constraint ck_zhaozhenlongddd check(c4 in('0','1')) ,
       c5 char(1) not null,
       constraint un_zhaozhenlong51 unique(c1,c2),
       constraint ch_zhaozhenlong51 check(c5 in('Y','N'))
);
--drop table tb_zhaozhenlong6;
create table tb_zhaozhenlong6(
       c1 varchar2(10) not null, constraint fk_zhaozhenlong6 foreign key(c1) references tb_zhaozhenlong5(c1),
       c2 varchar2(10) not null,
     &nb


相关文档:

SQL Server2000中死锁经验总结

   我们在做很多项目时都要涉及到数据库,特别是一些比较大型的web项目,更是有较大的并发处理,所以对数据库的操作有可能会产生死锁,对于数据库的死锁,一般数据库系统都会有一套机制去解锁,一般不会造成数据库的瘫痪,但解锁的过程会造成数据库性能的急速下降,反映到程序上就会造成程序的反应性能的下降,并 ......

SQL Server 几个好用的SQL语句

SQL Server 几个好用的SQL语句
1、复制表
 select * into desttable from srctable
 将 srctable 完整地复制一份到 desttable 中,当然后面也可以加上条件来限定需要复制的记录
 要求:desttable 必须为不存在的表名。
 insert into desttable(column1, column2) select columna, columnb from sr ......

SQL存储过程测试(9)——示例程序

      此部分内容创建一个轻量级T-SQL测试套件,总共有3个脚本:
用于创建测试平台数据和待测存储过程的脚本
--======================
--makeDbTestAndResults.sql
use master
go
if exists (select * from sysdatabases where name = 'DbTestAndResults')
 drop database makeDbTes ......

ORACLE PL/SQL子程序

温故而知新,果然如此呀,第二次再翻开同样的内容果然有不同的收获,有些是第一次看的时候没有仔细理解的,还有些可能是在第一次看匆匆就跳过的,当然,可能还有部分是自己当时记住了完了又给忘记了。今天第二次看到子程序这一章节,发现了些新的内容,呵呵。在这里我就写下一些基本内容和容易忘记的,免得下次又给忘了。内 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号