![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
Jeson_Yang
佛系码农
展开
-
mysql float double 类型
1.float类型float列类型默认长度查不到结果,必须指定精度,比如 num float, insert into table (num) values (0.12); select * from table where num=0.12的话,empty set。num float(9,7), insert into table (num) values (0.12); selec原创 2014-06-30 15:53:31 · 1348 阅读 · 1 评论 -
MySql的like语句中的通配符:百分号、下划线和escape
MySql的like语句中的通配符:百分号、下划线和escape%代表任意多个字符Sql代码 http://blog.csdn.net/yc7369/select * from user where username like '%huxiao'; select * from user where username like 'huxiao%'; select *原创 2014-07-02 16:12:32 · 7304 阅读 · 3 评论 -
mysql中insert与select的嵌套使用
如何在mysql从多个表中组合字段然后插入到一个新表中,通过一条sql语句实现。具体情形是:有三张表a、b、c,现在需要从表b和表c中分别查几个字段的值插入到表a中对应的字段。对于这种情况,我们可以使用如下的语句来实现:INSERT INTO db1_name(field1,field2) SELECT field1,field2 FROM db2_name当然,上面的语句比较适合两个表的原创 2014-07-15 12:31:23 · 7488 阅读 · 8 评论