项目场景:
提示:这里简述项目相关背景:
例如:项目场景:查询类型为stageType 不重复的没有被删除的并且不为空的所有stageType sql语句
问题描述
提示:这里描述项目中遇到的问题:
原语句:
select disnict stageType from stageInfo where is_deleted='y' is not null
原因分析:
提示:这里填写问题的分析:
例如:没理清逻辑:
应该是where 后面条件接两个,一个是不为’n’的,一个是指定哪个类型不为空
解决方案:
提示:这里填写该问题的具体解决方案:
正确语句:
select disnict stageType form stageInfo where is_deleted=‘n’ and stageType is not null