码迷,mamicode.com
首页 >  
搜索关键字:primary    ( 4545个结果
Hibernate 一对多 保存和修改数据
Student和Sclass表,Student外键cid是Sclass的cidcreate table sclass(cid varchar(8) primary key,cname varchar(10) )gocreate table Student (sid int primary key,s...
分类:Web程序   时间:2015-10-22 14:09:29    阅读次数:370
Mysql5.7.9原生JSON格式支持
Mysql5.7.9原生JSON格式支持 创建表 create?table?news?(uid?int?auto_increment,?data?json,?primary?key(uid))engine?innodb; 插入数据 insert?into?news?values?(NULL,‘{"name":"tester","mail...
分类:数据库   时间:2015-10-22 12:38:49    阅读次数:388
select count(*)和select count(1)的区别 (转)
A一般情况下,Select Count (*)和Select Count(1)两着返回结果是一样的 假如表沒有主键(Primary key), 那么count(1)比count(*)快, 如果有主键的話,那主键作为count的条件时候count(主键)最快 如果你的表只有一个字段的话那count(*...
分类:其他好文   时间:2015-10-21 20:40:12    阅读次数:156
mysql实用教程的数据构造
create database XSCJ;use XSCJ; create table XS (学号 varchar(6) primary key not null,姓名 varchar(8) not null,专业名 varchar(10),性别 tinyint(1) not null,出生日期 ...
分类:数据库   时间:2015-10-21 01:44:10    阅读次数:180
商城数据库建表
商品类型管理:先要创建商品类型的表,用来存储商品类型的信息。create table i_type( id tinyint unsigned primary key auto_increment, type_name varchar(32) not null comment '商品类型的名称', i...
分类:数据库   时间:2015-10-20 22:53:55    阅读次数:769
SQL Server文件组和分区
在一个最简化的SQL Server数据库中,包含两种操作系统文件:数据文件和日志文件。数据文件包含数据和一些对象,如表,索引,存储过程,视图等;日志文件包含恢复数据库事务的信息。数据库文件SQL Server数据库有三种文件。Primary文件,每个数据库都有一个主要文件,使用.mdf扩展名。Sec...
分类:数据库   时间:2015-10-20 13:57:18    阅读次数:212
PostgreSQL simple select(group by and insert into ...select)
warehouse_db=# create table student(number int primary key,name varchar(20),age int);CREATE TABLEwarehouse_db=# insert into student values (1,'David',...
分类:数据库   时间:2015-10-19 10:36:50    阅读次数:287
php限定时间内同一ip只能访问一次
建立一个数据表 CREATE TABLE `clicks` ( `ip` INT UNSIGNED NOT NULL , `time1` INT UNSIGNED NOT NULL , `time2` INT UNSIGNED NOT NULL , PRIMARY KEY ( `ip` ...
分类:Web程序   时间:2015-10-18 12:45:31    阅读次数:184
字段属性(一)
mysql中有的属性:NOLL/NOT NULL,default,comment,primary key,unique key,auto_increment查询字段为空的字段:select × from stuent where sex is null;default :默认值:comment :....
分类:其他好文   时间:2015-10-18 11:18:17    阅读次数:151
Sqlite基本操作
主键自增 --创建表 create?table?user(userid?inter?primary?key,username?varchar(20),birthdate?date,addr?varchar(100)) --新增数据 insert?into?user?values(1,‘jin‘,‘2000-10-10‘,‘广东深圳‘);...
分类:数据库   时间:2015-10-16 13:44:56    阅读次数:232
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!