这两个SQL语句查询的结果为什么不一样?区别在哪里呢?
SELECT(row_number()Over(OrderBycl_client_id))Asrownumber,cl_client_id,cl_full_name,cl...
SELECT (row_number() Over (Order By cl_client_id)) As rownumber, cl_client_id, cl_full_name, cl_email,cl_clubmembers,cl_vip_discount, cl_manager, cl_memo, cl_buyer_id,ce_email_is_sent
FROM t_client_list with(nolock) inner join t_client_email on ce_client_id=cl_client_id WHERE cl_status <> 'X' AND isnull(cl_email,'')<>'' and isnull(ce_email_is_sent,'')=''
SELECT (row_number() Over (Order By cl_client_id)) As rownumber, cl_client_id, cl_full_name, cl_email,cl_clubmembers,cl_vip_discount, cl_manager, cl_memo, cl_buyer_id
FROM t_client_list with(nolock) WHERE cl_status <> 'X' AND isnull(cl_email,'')<>''
and exists (select ce_email_is_sent from t_client_email where isnull(ce_email_is_sent,'')='' AND ce_client_id=cl_client_id) 展开
FROM t_client_list with(nolock) inner join t_client_email on ce_client_id=cl_client_id WHERE cl_status <> 'X' AND isnull(cl_email,'')<>'' and isnull(ce_email_is_sent,'')=''
SELECT (row_number() Over (Order By cl_client_id)) As rownumber, cl_client_id, cl_full_name, cl_email,cl_clubmembers,cl_vip_discount, cl_manager, cl_memo, cl_buyer_id
FROM t_client_list with(nolock) WHERE cl_status <> 'X' AND isnull(cl_email,'')<>''
and exists (select ce_email_is_sent from t_client_email where isnull(ce_email_is_sent,'')='' AND ce_client_id=cl_client_id) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询