数据库 mysql
name |
---|
wz |
hl |
[ 'xm' ,'xw' ,'xl' ,'wz' ,'bt' ,'hh']
select temp.name,if(temp.name = test.name,1,0) as 'is_null' from (
select 'xm' as name
union all select 'xw'
union all select 'xl'
union all select 'wz'
union all select 'bt'
union all select 'hh'
) as temp
left join test on temp.name=test.name
return
name | is_null |
---|---|
xm | 0 |
xw | 0 |
xl | 0 |
wz | 1 |
bt | 0 |
hh | 0 |
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。