DROP TABLE IF EXISTS `province`;CREATE TABLE `province` (`id` int(11) NOT NULL AUTO_INCREMENT,`name` varchar(50) DEFAULT NULL,PRIMARY KEY (`id`)) ENGI...
分类:
数据库 时间:
2015-01-20 17:15:54
阅读次数:
296
Oracle dataguard1 Dataguard架构Dataguard架构按照功能分为3部分:日志发送日志接收日志应用1.1 日志发送日志发送由primary database的LGWR和ARCH进程完成,两者对数据保护能力和系统可用性有很大的区别1.1.1 使用ARCH进程(1) prima...
分类:
数据库 时间:
2015-01-20 10:11:06
阅读次数:
483
转载 http://www-01.ibm.com/support/docview.wss?uid=swg21514783 Cause Have a HADR pair with Primary online but a failure on the Standby makes it necessar...
分类:
数据库 时间:
2015-01-19 20:51:42
阅读次数:
223
首先看看表结构!
customer表:
create table customers
(
ID bigint not null primary key auto_increment,
userName varchar(20)
);
Order表:
create table orders
(
ID bigint not null prim...
分类:
Web程序 时间:
2015-01-19 17:18:11
阅读次数:
597
在表ALL_CONSTRAINTS中约束类型CONSTRAINT_TYPE:
C (check constraint on a table)--约束,如not null,check
P (primary key)--主键
U (unique key) --唯一键约束
R (referential integrity)--外键
--下面两个是作用于视图
V (with check opt...
分类:
数据库 时间:
2015-01-19 10:56:56
阅读次数:
201
??
字段属性设置
not null 不为空
auto_increment 设定int类型字段的值可以“自增长”,即其值无需“写入”,而会自动获得并增加
注:此属性必须随同 primary key 或 unique key 一起使用。
[primary] key: 设定为主键。是唯一键“加强”:也不能重复并且不能使用null,并且可以作为确定任意一行数据的“关键值”
unique ...
分类:
其他好文 时间:
2015-01-19 09:19:44
阅读次数:
161
http://blog.sina.com.cn/s/blog_63a48d250100smu3.html--主键约束(Primary Key constraint):要求主键列的数据唯一,并且不允许为空。--唯一约束(Unique Constraint):要求该列唯一,允许为空,但只能出现一个空值。...
分类:
数据库 时间:
2015-01-19 01:34:15
阅读次数:
1196
create table tmm_d_entitle_admin( admin_pk int primary key, soeid varchar2(15), start_date date, end_date date ) ; insert into tmm_d_entitle_admin val...
分类:
其他好文 时间:
2015-01-17 09:56:09
阅读次数:
256
这里用一个实例来演示PostgreSQL存储过程如何返回数据集.
1 首先准备数据表
//member_category
create table member_category(id serial, name text, discount_rate real, base_integral integer);
alter table member_category add primary ke...
分类:
数据库 时间:
2015-01-16 19:17:15
阅读次数:
242
use sales --指定数据库
create table bb --创建bb 这个表
(
ID int not null primary key ,--账号
Moneys money --转账金额
)
--bb表里插入两条数据
insert into bb values('1',2000) --账户 1 里有2000元
insert into bb values('2',3000...
分类:
数据库 时间:
2015-01-16 16:52:13
阅读次数:
184