在表格中查找重复的原始数据 [英] finding duplicate raws in a table

查看:99
本文介绍了在表格中查找重复的原始数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

sql命令中 IN NOT IN 的含义是什么?

What is the meaning of IN and NOT IN in sql command?

推荐答案

您的问题标题&问题内容....不匹配。



关于表中的重复行,您可以使用 DISTINCT 关键字。例如,Employee表有大量记录,其中包含员工ID,姓名,名称,部门等详细信息。现在,如果要显示名称列表,请使用以下查询。

Your question title & question content .... not matching.

Regarding duplicate rows in table, you could use DISTINCT keyword. For example Employee table has tons of records with details such as employee id, name, designation, department, etc., Now, if you want to display list of designations, use the following query.
SELCT DISTINCT EMP_DESIGNATION FROM TABLE_EMP



IN (& NOT IN )关键字用于指定WHERE子句中的条件。


IN( & NOT IN) keywords are used to specify criteria in WHERE clause.

SELECT *
FROM TABLE_EMP
WHERE EMP_DESIGNATION IN ('Manager','Supervisor');



以上查询将显示所有经理或主管的员工。 NOT IN 的工作方式与 IN 相反,就像它会显示所有不经理或主管。


Above query will display all employees who're Manager or Supervisor. NOT IN works opposite way of IN like it'll display all employees who're not Manager or Supervisor.


参考这些链接



SQL IN操作员 [ ^ ]



SQL Server中的EXCEPT vs NOT IN [ ^ ]



问候..:)
Refer these links

SQL IN Operator[^]

EXCEPT vs NOT IN in SQL Server[^]

Regards..:)


这篇关于在表格中查找重复的原始数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆