-- 查询在用的用户信息select*from users where isused =1select*from users where isused !=0select*from users where isused <>0-- 查询组织"00001"下的在用用户select*from users where ecode ='00001'-- 查询组织"00001\00002"下的在用用户select*from users where ecode ='00001'or ecode ='00002'select*from users where ecode in('00001','00002')-- 查询在"2023-05-20"上报的事件select*from event_base where reporttime ='2023-05-20'-- 查询在"2023-05-20"之后上报的事件select*from event_base where reporttime >'2023-05-20'-- 查询在"2023-05-20"之前上报的事件select*from event_base where reporttime <'2023-05-20'-- 查询在"2023-05-20~2023-05-30"上报的事件select*from event_base where reporttime >='2023-05-20'and reporttime <='2023-05-30'
selecy *from event_base where reporttime between'2023-05-20'and'2023-05-30'-- 查询非已关闭的事件select*from event_base where state notin('0000004')-- 查询组织信息为null的用户信息select*from users where ecode isnull-- 查询组织信息为空的用户信息select*from users where ecode =' '-- 查询姓"枫"的用户select*from users where truename like'枫%'-- 查询姓"枫"并且全称是两个字的用户select*from users where truename like'枫_'-- 查询姓名中包含"枫"字的用户select*from users where truename like'%枫%'