Primary key 与Unique Key都是唯一性约束。但二者有很大的区别:1、Primary key的1个或多个列必须为NOT NULL,如果列为NULL,在增加PRIMARY KEY时,列自动更改为NOT NULL。而UNIQUE KEY 对列没有此要求。2、一个表只能有一个PRIMARY...
分类:
其他好文 时间:
2015-08-20 18:38:45
阅读次数:
176
建表语句:CREATE TABLE googs(id INT(12) auto_increment PRIMARY KEY,gname VARCHAR(12),gprice DOUBLE);CREATE TABLE googs_temp(id INT(12) auto_increment PRIMA...
分类:
其他好文 时间:
2015-08-20 12:17:24
阅读次数:
79
QT对数据库的支持 QtSql类用于对数据库的支持 使用是需包含库 包含以下类: QSqlDatabase 类用于新建数据库 QSqlQuery用来来执行sql语句,如QSqlQuery query;query.exec("create table student(ID int primary ke...
分类:
数据库 时间:
2015-08-20 00:59:17
阅读次数:
544
按照本文操作和体会,会对sql优化有个基本最简单的了解,其他深入还需要更多资料和实践的学习:? 1. 建表:? 复制代码?代码如下: create table site_user? (? id int IDENTITY(1,1) PRIMARY KEY,? [name] v...
分类:
数据库 时间:
2015-08-19 17:55:47
阅读次数:
242
第4章 安装CentOS 5.x与多重引导小技巧
1. 本练习机的规划(尤其是分区参数)
分了四个分区:
1)/boot:primary
2)/:primary
3)/home:primary
4)swap:logical
2. 开始安装CentOS 5
首先谈了调整启动...
分类:
系统相关 时间:
2015-08-19 13:34:25
阅读次数:
209
准备一些测试数据,如下:use TestCreate table Student(ID int identity(1,1) primary key,[Name] nvarchar(50) not null)Create Table Book(ID int identity(1,1) primar.....
分类:
其他好文 时间:
2015-08-19 12:42:36
阅读次数:
101
双击设置的table,然后双击Columns里面的primary key,然后,一次点击如下图标:...
分类:
其他好文 时间:
2015-08-19 11:19:28
阅读次数:
126
建表:帖子表和回复表create table thread(tid int not null auto_increment primary key,username varchar(20) not null default '',title varchar(40) not null default ...
分类:
其他好文 时间:
2015-08-18 18:31:43
阅读次数:
99
create table if not exists Teachaers(tea_id integer primary key autoincrement,tea_name text,tea_gender text,tea_age interger,tea_salary text)...
分类:
数据库 时间:
2015-08-18 12:04:06
阅读次数:
129
一、环境1、架构图2、部署详细10.10.17.26:27000(primary)
10.10.17.27:27000(secondary)
10.10.2.74:27000(arbiter)二、安装配置1、安装见mongodb安装2、撰写配置文件vi/etc/mongod_27000.conf
logpath=/data/mongodb/navy_db/log/mongod.log#mongodb日志文件
logappend..
分类:
数据库 时间:
2015-08-18 06:48:47
阅读次数:
365