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
相关文档:
1.asp.net连接oracle服务器需要添加Sytem.Data.OracleClient命名空间,将System.Data.OracleClient.dll加入到项目中。
2.连接时需要ConnectionString字符串,出现在web.config文件中,如下所示:
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=( ......
Oracle执行外部文件:
c:>sqlplus user/pwd@db
sql>@new.sql
执行多个sql文件:
1.把所有的文件都放在同一个目录下,然后在命令行里执行命令:
c:>dir/b > d:\1.sql
会把所有的sql文件名都输出到一个sql文件中。
2.用UltraEdit打开生成的 ......
用Oracle9i自带的企业管理器或PL/SQL图形化的方法创建表空间和用户以及分配权限是相对比较简单的,本文要介绍的是另一种方法,使用Oracle 9i所带的命令行工具:SQLPLUS来创建表空间,这个方法用起来更加简明快捷。
假设 ......
安装前的准备:
登录系统:sqlplus system/0621
1. 从数据字典v$instance中获取数据库的实例名和版本号:select instance_name,version from v$instance;
2. 从数据字典v$version中获取版本的详细信息:select * from v$version;
3.确认oracle所使用的参数文件 ......