2014年1月8日
摘要: bit_count函数的含义用来计算二进制数中包含1的个数。selectBIT_COUNT(10);因为10转成二进制是1010,所以该结果就是2。bit_or函数的含义就是对两个二进制数进行或运算。如: 1100或 0101-------------- 1101摘自:http://www.01happy.com/mysql-bit_count-bit_or/ 阅读全文
posted @ 2014-01-08 14:08 语辰 阅读(214) 评论(0) 推荐(0) 编辑
摘要: SELECT s.* FROM person p INNER JOIN shirt sON s.owner = p.idWHERE p.name LIKE 'Lilliana%'AND s.color 'white'; 阅读全文
posted @ 2014-01-08 13:45 语辰 阅读(252) 评论(0) 推荐(0) 编辑
摘要: To find names containing exactly five characters, use “^”and “$”to match the beginning and end of thename, and five instances of “.”in between:mysql> SELECT * FROM pet WHERE name REGEXP '^.....$';或者SELECT * FROM pet WHERE name REGEXP '^.{5}$'; 阅读全文
posted @ 2014-01-08 11:52 语辰 阅读(211) 评论(0) 推荐(0) 编辑
摘要: alter table fx.pet modify column `species` varchar(20) binary; 阅读全文
posted @ 2014-01-08 11:51 语辰 阅读(144) 评论(0) 推荐(0) 编辑
摘要: To find names containing a “w”, use this query:SELECT * FROM pet WHERE name REGEXP 'w'; 阅读全文
posted @ 2014-01-08 11:46 语辰 阅读(402) 评论(0) 推荐(0) 编辑
摘要: select * from pet where species regexp '^c'; 阅读全文
posted @ 2014-01-08 11:31 语辰 阅读(120) 评论(0) 推荐(0) 编辑