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

ORacle语句

 MYSQL/MSSQL/ORACLE数据库脚本代码 收藏
/******************************************************************************/
/*
主流数据库MYSQL/MSSQL/ORACLE测试数据库脚本代码
脚本任务:建立4个表,添加主键,外键,插入数据,建立视图
运行环境1:microsoft sqlserver 2000 查询分析器
运行环境2:mysql5.0 phpMyAdmin网页界面
运行环境3:oracle 9i SQL*PLUS命令行界面
author:chinayaosir
blog:   http://blog.csdn.net/chinayaosir/
QQ:    44633197
声明:严禁其它网站不经过作者chinayaosir同意任意转载
*/
/******************************************************************************/
/*script test ok with microsoft sqlserver 2000 查询分析器 */
/******************************************************************************/
/*DB:MSSQL2000 SCRIPT*/
/*0.drop table list*/
    drop  table Employee;
    drop  table Department;
    drop  table Post;
    drop  table Account;
/*********************************************************/
/*DB:MSSQL2000 SCRIPT*/
/*1.create all table*/
create table Account(
    oid     int  not null,
    username varchar(30) not null,
    password varchar(10)  null,
    invalid    varchar(1)  null          
);
create table bab.Post(
    /*oid     int identity(1,1) not null primary key,*/
    oid     int  not null,
    postName varchar(30) not null
);
create table Department(
    oid     int  not null,
    deptName varchar(30) not null,
    parentid  int  null,
    manager   varchar(30)  null,
    email     varchar(30)  null
);
create


相关文档:

oracle中分页的实现方式.rownum的使用

对于rownum来说它是oracle系统顺序分配为从查询返回的行的编号,返回的第一行分配的是1,第二行是2,依此类推,这个伪字段可以用于限制查询返回的总行数,而且rownum不能以任何表的名称作为前缀。
 举例说明:
例如表:student(学生)表,表结构为:
ID       char(6)      --学号
name   ......

[转]Oracle 随机获取N条数据


当我们获取数据时,可能会有这样的需求,即每次从表中获取数据时,是随机获取一定的记录,而不是每次都获取一样的数据,这时我们可以采取Oracle内部一些函数,来达到这样的目的.   
  
   1) select * from (select * from tablename order  ......

Oracle Application Express 的安装

安装前的准备:
      登录系统:sqlplus system/0621
1.   从数据字典v$instance中获取数据库的实例名和版本号:select instance_name,version from v$instance;
2.   从数据字典v$version中获取版本的详细信息:select * from v$version;
3.确认oracle所使用的参数文件 ......

ORACLE自增长字段实现

首先,你要有一张表!
        CREATE TABLE example(
              ID Number(4) NOT NULL PRIMARY KEY,
              NAME VARCHAR(25 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号