主流数据库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 table Employee(
oid
相关文档:
select v.spid spid,v.appid appid,v.version version,v.newversion newversion,v.status status,v.createtime createtime from adc_spversionchangeapply v inner join adc_application a on a.id=v.appid
where a.create_by = 'a' and v.appid = '12000000005' and (v ......
一、 常用日期数据格式
1.Y或YY或YYY 年的最后一位,两位或三位
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_char(sysdate,'YYY ......
在oracle中当我们新建了多个数据库后,再次登录时,系统默认的是最后创建的那个数据库。
如何设置我们自己想要的默认数据库呢?
方法很简单,我们只需在运行窗口里输入regedit,即可进入注册表编辑器,在HKEY_LOCAL_MACHI ......
在 Oracle 中,对于已经建好的主键,是自动创建索引的,并且索引是创建到当前的表空间中的,如果要将索引更换到其它表空间,可以使用如下的方法,超简单:
alter index index_aaa rebuild tablespace newtablespace;
newtablespace 是新指定的表空间。 ......
Linux + JDK + Tomcat + MySQL + JDBC 安装手记
一、Red Hat Linux
1.分区
| swap & ......