易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

关于mysql中触发器执行动态sql的问题

    这几天手头开发的系统要做一个类似windows账户到期时间的功能,考虑了半天想出了一个技术上和逻辑上都还能实现的解决方案:
创建一个用户存入数据库的时候都创建一个事件调度器来控制用户的到期时间(mysql的时间调度器确实很方便)。想起来是很简单,但是做起来问题确实一波接一波...
一些小问题就不 ......

从各种位置截取字符串的SQL语法

知: 字段A='F:\photo\Winter Leaves.jpg'  
要求:分段截取每段字符[字段A不能为TEXT类型,否则报错]
解决方法:
---截取字符串A的第一个\左边的字符串
select left(A,charindex('/',A)-1)
输出结果:F:
---截取\中间的字符串
select  left(stuff(A,1,charindex('/',A),''),charindex('/',stuff(A,1,c ......

oracle 10g pl/sql 学习

选择10g是因为对网格技术比较好奇,好像还没得到广泛应用,也就无所谓与前面版本有很大区别了。
在迅雷上下了个软件,运行sqlplusw,然后照着书,狂敲了一翻,有在网上下了个视频教程(MLDN魔乐科技_Oracle课堂),讲得挺好的,就是时间长了点,不如看书来得快。反正现在只是想熟悉一下基本语句。
看了两天书了。了解了一 ......

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

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

解决ASP防SQL注入攻击程序问题


现在比较流行的SQL注入工具的工作方式是通过GET和POST来完成具体的注入。我们可以将注入时所用到的一切符号过滤掉。那么我们可以通过简单的判断语句来达到目的。我们先来过滤GET吧。
代码如下:
dim sql_injdata SQL_inj SQL_Get
SQL_injdata = "’|and|exec|insert|select|delete|update|count|*|%|chr|mid|mast ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号