作业帮 > 综合 > 作业

这句SQL语句是什么意思.ql="select distinct(selabel) from.

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/27 18:57:14
这句SQL语句是什么意思.ql="select distinct(selabel) from.
sql="select distinct(selabel) from kcwl_labprosellog where isdel=0 "&sqlfile&" and selabel not in (select distinct(selabel) from kcwl_labprosell) "
这个语句是什么作用的.说具体详细点.好像是查询2个表的数据,我要删除它显示出来的数据,怎么改呢?
如有很多条记录,如何删除单个记录呢?
sql="select distinct(selabel);&&选取无重复记录的selabel字段
from kcwl_labprosellog ;&&来自表kcwl_labprosellog
where isdel=0 "&sqlfile&" and selabel not in;&&字段Isdel值为0且字段selabel的值不存在于后面的查询中
(select distinct(selabel) from kcwl_labprosell) "&&选取kcwl_labprosell表中无重复记录的selabel字段
删除相应数据sql="delete from kcwl_labprosellog where selabel in;(select distinct(selabel) from kcwl_labprosellog where ;isdel=0 "&sqlfile&" and selabel not in (select distinct(selabel); from kcwl_labprosell)) "
删除单条记录一样的,写上你要删除的条件就行,例如,删除selabel字段值为张三的:SQL="delete from kcwl_labprosellog where selabel="张三""