1 准备表和数据CREATE TABLE orders( order_id INT PRIMARY KEY AUTO_INCREMENT, order_no VARCHAR(20), order_price FLOAT);INSERT INTO orders(order_no, order_pric...
分类:
其他好文 时间:
2015-09-15 11:08:13
阅读次数:
179
1,普通索引的创建 普通索引可以在建表的时候创建 sql :create table temp2(id int(10) not null auto_increment ,title varchar(10) not null, content varchar(10) not null,primary....
分类:
数据库 时间:
2015-09-15 11:07:28
阅读次数:
132
1 准备表和数据CREATE TABLE orders( order_id INT PRIMARY KEY AUTO_INCREMENT, order_no VARCHAR(20), order_price FLOAT);INSERT INTO orders(order_no, order_pric...
分类:
其他好文 时间:
2015-09-15 10:57:13
阅读次数:
114
建表:CREATE TABLE `my_tb` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_code` varchar(255) DEFAULT NULL, `code` varchar(255) DEFAULT NULL, PRIMARY...
分类:
数据库 时间:
2015-09-14 13:57:03
阅读次数:
145
1、在mysql 中建立一个数据库 test1 语句:create database test1 2、创建表examinfo create table examinfo( id int auto_increment not null, endtime datetime, primary key(id...
分类:
数据库 时间:
2015-09-13 23:11:43
阅读次数:
460
理解 sql 的子查询理解 sql 的子查询Table of Contents总结:来源: 网上的公开课数据准备create table goods ( goods_id mediumint(8) unsigned primary key auto_increment, goods_name var...
分类:
数据库 时间:
2015-09-12 00:44:54
阅读次数:
331
建了一个表,建表SQL语句如下:CREATE TABLE `myuser` (`uid` int(11) unsigned NOT NULL auto_increment,`username` varchar(250) NULL default '王兵',`photo` varchar(250) N...
分类:
其他好文 时间:
2015-09-11 14:27:46
阅读次数:
186
/*CREATE TABLE `category` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pid` int(11) NOT NULL DEFAULT '0', `cname` varchar(30) NOT NULL, PRIMARY KEY (`...
分类:
Web程序 时间:
2015-09-11 09:09:08
阅读次数:
181
1 用mysql创建一张表,字段有id(主键自增)、ip地址、时间。CREATE TABLE mytable ( id int not null auto_increment, ipaddress varchar(45) not null, time datetim...
分类:
数据库 时间:
2015-09-09 19:04:20
阅读次数:
198
1 innodb 自增列出现重复值的问题 先从问题入手,重现下这个buguse test;drop table t1;create table t1(id int auto_increment, a int, primary key (id)) engine=innodb;insert into t...
分类:
数据库 时间:
2015-09-09 17:28:37
阅读次数:
195