数据库

 首页 > 数据库 > MySql > SqlServer表中两条完全相同的记录,如何删除其中1条

SqlServer表中两条完全相同的记录,如何删除其中1条

分享到:
【字体:
导读:
         摘要:SELECT DISTINCT * INTO #temp FROM grade;DROP TABLE grade;SELECT * INTO grade FROM #temp;DROP TABLE #temp;SELECT DISTINCT * INTO #temp FROM grade;DROP TABLE grad...

SqlServer表中两条完全相同的记录,如何删除其中1条

描述:表无主键ID,误插入两遍数据,如何删除内容相同的记录,而只留下1条。

SELECT DISTINCT * INTO #temp FROM grade;
DROP TABLE grade;
SELECT * INTO grade FROM #temp;
DROP TABLE #temp;


SqlServer表中两条完全相同的记录,如何删除其中1条
分享到:
非super user管理会话
非super user管理会话在gp中取消或者中断某个用户的超长时间或者SQL存在问题的会话,如果无法拥有超级用户将无法执行该类操作。   首先我们创建两个用户t1、t2,并且使用t1登录到数据库。[gpadmin@wx60 ~]$ psql gtlions psql (8.2.15) Type "help" for help. gtlions=# select version(); ...
error while loading shared libraries: ...
error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file安装rac10g,出现如下错误: [root@rac2 oracle]# /u01/product/crs/root.sh WARNING: directory '/u01/product' is not owned by root Checking to see if Oracle CRS stack is already configured /etc...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……