mysql

SHOW COLUMNS FROM  tbl_desc WHERE lower(Field) NOT IN ('id');

GROUP_CONCAT: group后连接同一列数据

CONCAT, CONCAT_WS: 连接不同列数据

取前3,4,5条数据: select * from t_book t where  (select count(1) from t_book t1 where t.bookId > t1.bookId) BETWEEN 2 and 4

转数字: select CONVERT('1a', SIGNED), CAST('1a' as SIGNED),CONVERT('1a', DECIMAL)

if(condition, true, false), coalesce(col, null('a')|else(col))
posted @ 2021-07-23 17:38  何亮1  阅读(19)  评论(0编辑  收藏  举报