码迷,mamicode.com
首页 >  
搜索关键字:primary    ( 4545个结果
关于SQL Server数据表的五中约束
1、主键约束(PRIMARY KEY)主键约束可以在表中定义一个主键值,它可以唯一确定表中每一条记录,每个表中只能有一个主键约束(只能有一个主键约束的意思并不是说受主键约束的列只能有一个),并且受主键约束的列不能为空值。如果主键约束定义在不止一列上,则某一列中的值可以存在重复,但是受主键约束的所有列...
分类:数据库   时间:2015-03-20 18:36:14    阅读次数:151
SQL常用
use db_sqlserver;gocreate table db_table6( 订单编号 int primary key, 订单号 varchar(50) unique, 职工号 varchar(50) references db_table5(职工号), 订购日期 datetime...
分类:数据库   时间:2015-03-20 18:17:32    阅读次数:221
题目:写出一条SQL语句,查询工资高于10000,且与他所在部门的经理年龄相同的职工姓名。
create table Emp(eid char(20) primary key,ename char(20),age integer check (age > 0),did char(20),salary float,)create table Dept(did char(20) primary...
分类:数据库   时间:2015-03-20 17:48:51    阅读次数:408
MySQL中默认值中用时间函数的问题
今天在上课的时候在测试MSSQL建表的时候 注册时间默认值用getdate()可以获取插入值时候的时间create table temp( id int PRIMARY key, in_time datetime NOT NULL default getdate() )但是在MYSQL建表练习的时候...
分类:数据库   时间:2015-03-19 21:55:03    阅读次数:137
SQL制表
use School if exists (select*from sysobjects where name='Teacher')drop table Teacher gocreate table Teacher(Id int primary key identity(1,1), --参数第一个种...
分类:数据库   时间:2015-03-19 21:54:52    阅读次数:165
SQL使用代码创建数据完整性,约束
--使用代码创建数据完整性:--主键约束(primary key PK) 唯一键约束(unique UQ) 默认值约束(default DF) check约束(check CK) 主外键约束(foreign key FK)--语法:--alter table 表名--add...
分类:数据库   时间:2015-03-19 21:52:20    阅读次数:148
JDBC学习笔记(9):访问二进制数据
数据库准备:create table blob_test( id integer not null auto_increment, big_bit blob not null, primary key(id));在工程目录下新建一个images文件夹,存入一张zhukov.jpg图...
分类:数据库   时间:2015-03-19 20:05:41    阅读次数:191
New JavaScript techniques for rapid page loads 加快页面载入的新js技术
Speed has always been one of Chrome's primary missions, ever since it was included as one of the founding principles in 2008. But speed is about more ...
分类:编程语言   时间:2015-03-19 18:15:02    阅读次数:289
windows下mysql主从同步时从服务器出现表已经存在解决办法
问题如下:mysql>showslavestatus\G***************************1.row***************************Slave_IO_State:Master_Host:172.168.3.190Master_User:slaveMaster_Port:12148Connect_Retry:60Master_Log_File:binlog.000001Read_Master_Log_Pos:753Relay_Log_File:WIN-O..
分类:数据库   时间:2015-03-19 11:46:24    阅读次数:551
JDBC学习笔记(8):访问大段文本数据
数据库准备:1 create table clob_test2 (3 id integer not null auto_increment,4 big_text text not null,5 primary key(id)6 );将大段文本添加进数据库: 1 public ...
分类:数据库   时间:2015-03-18 20:19:05    阅读次数:219
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!