摘要:
现象: SELECT t2.r_build_id,t3.hs_id,(CASE t3.ct_type WHEN '2' THEN '外迁' WHEN '3' THEN '货币' WHEN '' THEN '' ELSE '货币+外迁' END) AS ct_typeFROM house_info_r 阅读全文
摘要:
1、在mysql中在某个字段后面添加一个新的字段: alter table 表名 add 字段名 字段类型 after 哪个字段后; 2、查询数据库中重复的数据: select user_name,count(*) as count from user_table group by user_nam 阅读全文
摘要:
一:第一种: select (@i:=@i+1) as i,table_name.* from table_name,(select @i:=0) as it 例如: (1)简单实例:select (@i:=@i+1) i,user_id from spcp_user_20170803 ,(sele 阅读全文