• 0
  • 0

MYSQL 常用SQL语句

2020-03-23 56 0 admin 所属分类:Mysql

拼接字段返回字符串

SELECT GROUP_CONCAT(field_id) FROM your_table

NOT EXISTS 子查询筛选目标记录集 

SELECT * FROM `main_table` a WHERE NOT EXISTS(SELECT id FROM `sub_table` WHERE id=a.tid and `day`='20200517') LIMIT 50


返回顶部