主流数据库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
相关文档:
1、MySQL常用命令
create database name; 创建数据库
use databasename; 选择数据库
drop database name 直接删除数据库,不提醒
show tables; 显示表
describe tablename; 表的详细描述
select 中加上distinct去除重复字段
mysqladmin drop databasename 删除数据库前,有提示。
显示当前mysql版本和当前日期
s ......
今天安装mysql遇到很多麻烦,想象原因,自己还是linux的初学者,同时受挫时总是要把问题的复杂系数放大。
1 安装冲突
根据《linux程序设计》上的指导,从官网下载了mysql-server-xx,mysql-devel-xx,mysql-client-xx,mysql-share-xx,然后执行
rpm -i *.rpm
结果二十几行conflict提示,说有文件与mysql-server-xx的安 ......
dblp数据库中引用信息很少,平均一篇论文引用0.2篇。使用dblp做实验数据集的某篇论文提到,可以随机添加引用信息。受此启发,我打算为每一篇论文都添加20篇随机引用,于是就写出了如下的sql语句:
String sql = "insert into citation(pId1,pId2) values( (selec ......
昨天为一个项目做数据库,项目涉及到订单,在设计数据库字典的时候 就把这个表名定为了order,建表的时候怎么建都不对,提示是表名附近出现问题,当时觉得不可能啊 也许是字段类型哪儿出了问题,查了好久,试了好几次,还是不行,后来突然恍然大悟,order by是排序语句,order肯定是保留字,怎么可能做表名呢。。。立即把表 ......
http://hi.baidu.com/xiyouwang/blog/item/9f15bbee99b0ce202df5349e.html
现在的互联网上,很多网站都提供了全文搜索功能,浏览者可以通过输入关键字或者是短语来搜索特定的资料。在PHP+MySQL构架的网站中,通常的做法是通过SELECT查询的Like语句来进行搜索,这一办法存在搜索不够精确、以及效率非常低下的缺点。比如对 ......