主流数据库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 int&nb
相关文档:
/******************************************************************************/
/*
主流数据库MYSQL/MSSQL/ORACLE测试数据库脚本代码
脚本任务:建立4个表,添加主键,外键,插入数据,建立视图
运行环境1:microsoft sqlserver 2000 查询分析器
运行环境2:mysql5.0 phpMyAdmin网页界面
运行环境3:oracle 9i SQL*P ......
配置主从:
两台服务器mysql版本一样,
Server version: 5.1.16-beta-log MySQL Community Server
配置基本一样、启动参数一样
主的可以访问从的,
但是
从那边怎么连接主的,都是失败:
[root@2006 htmlfile]# mysql -h192.168.xx.xxx -uxxx -pxxx --default-character-set=GBK --reconnect
ERROR 2003 (HY000): C ......
dblp数据库中引用信息很少,平均一篇论文引用0.2篇。使用dblp做实验数据集的某篇论文提到,可以随机添加引用信息。受此启发,我打算为每一篇论文都添加20篇随机引用,于是就写出了如下的sql语句:
String sql = "insert into citation(pId1,pId2) values( (selec ......
昨天为一个项目做数据库,项目涉及到订单,在设计数据库字典的时候 就把这个表名定为了order,建表的时候怎么建都不对,提示是表名附近出现问题,当时觉得不可能啊 也许是字段类型哪儿出了问题,查了好久,试了好几次,还是不行,后来突然恍然大悟,order by是排序语句,order肯定是保留字,怎么可能做表名呢。。。立即把表 ......