发布时间:2012-12-13 15:15:56
int范围:-2,147,483,648 ~ 2,147,483,647 int unsinged范围:0 ~ 4,294,967,295 十六机制:oxffffffff CREATE TABLE t1 (a INT UNSIGNED,b INT UNSIGNED) ENGINE =INNODB; INSERT INTO t1 SELECT 1,2; SELECT * FROM t1; root@python 14:40>SELECT a - b FROM t1;+----------------------+| a - b &nbs......【阅读全文】
发布时间:2012-12-13 15:12:12
工作中应该开发的要求,需要对1月到12月的数据用列的方式表示出来。表:CREATE TABLE orders(cid INT,cname VARCHAR(50),createdate DATETIME) SQL语句实现: SELECTb.cname,b.cid,MAX(b.MaxTimeZuoGui) MaxTimeZuoGui,MIN(b.MinTimeZuoGui) MinTimeZuoGui,SUM(b.month1) month1,SUM(b.month2) month2,SUM(b.month3) month3,SUM(b.month4) month4,SUM(b.month5)......【阅读全文】