Centos7sudoer问题求助

在Centos7存在以下问题
(1)为什么不在/etc/sudoers中的用户也可以使用sudo命令
(2)为什么配置$user ALL=(ALL) NOPASSWD:ALL 之后不可以免密码的sudo

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
关于WSDL的问题,求助,求助,求助,求助!!!!!!!!!!!!
WDSL文件如下:rnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrn////////////////////////////////////rn载入的时候提示下列信息:rnparsing WSDL...rnrnrn[ERROR] wsdl:binding "http://schemas.xmlsoap.org/wsdl/SOAPWebServicesPortBinding" not found in the wsdl: file:/C:/Documents%20and%20Settings/Administrator/My%20Documents/NetBeansProjects/SOAPWebServices/src/conf/xml-resources/web-services/ServiceImpl/wsdl/webservices.wsdlrn,由于小弟初次接触 WS,所以请大家指点一下,谢谢啦!!!!!rnrn
求助,求助,查询问题!!
求助,我想查询1月开户数量,这样写 有什么问题..rn怎么查不出来啊?rnSELECT * FROM issuedetail a , nodeinfor brnWHERE a.nodeno =b.nodeno and a.tracode='07' AND a.opetime between '20090101' and '20090131' AND b.nodetree LIKE '5100000151000077%'rnrnrnopetime 交易时间rnISSUEDETAIL 发卡交易明细表rnnodeno 卡号rntracode 开户交易类型 rnrn
求助,求助!div的问题!!!
我用的弹出式下拉菜单,但现在遇到了一个问题:菜单平时显示正常,就是遇到下拉列表框的时候不能显示出来,总是下拉列表框置前,请问div有没有类似置前的属性啊!!!或有其他解决方法!还望不吝赐教,多谢,多谢!!!
求助求助,递归问题
函数sum(int a [],int n)的返回值是数组a[]的前几个元素之和?请使用递归的非递归两种方式实现。
[求助] 文件保存的问题 [求助]
怎么在 另存为 对话框预设置要保存文件的 文件名?rnrn保存好的文件怎么追加数据?rn
求助!!求助!!数据挖掘问题
各位大侠,小弟诚心跪求一篇关于"数据挖掘与企业财务分析"的研究生论文,有意者请联系我,"条件"和要求再议.谢谢.MSN:abonisqi@163.com QQ:18850373.
求助求助,显卡驱动问题
我的老显卡上写着S3 Trio 3D/2X onboard QCE2HC,请问要用什么驱动啊?(winme系统)在线等候》谢拉大家!
求助,求助,字符转换问题
注册表里总是不能正确显显,可以是字符转换那出了问题,请高手帮忙改一下 ,试了很长时也试出来 rnrn RegOpenKeyEx(hKey[3],KeyNum[0],0,0,0);rn RegQueryValueEx(hKey[3],KeyNum[0],0,0,NumTime[0],&dw);rn RegCloseKey(hKey[3]);rn x=atoi(NumTime[0]);rn if(x>Time)rn rn TCHAR a[]=TEXT("00");rn itoa(Time,a,10);rn NumTime[0]=a;rn RegOpenKeyEx(hKey[3],KeyNum[0],0,0,0);rn RegSetValueEx(hKey[3],KeyNum[0],0,REG_SZ,NumTime[0],sizeof(NumTime[0]));rn RegCloseKey(hKey[3]);rn
求助 !求助!报表问题
出现了入下图的错误rn[img=https://img-bbs.csdn.net/upload/201411/17/1416227663_121289.png][/img]rn 也就是当’分组表头‘在页尾,’主项数据‘(为超文本格式)就会与页注脚重合。rn[img=https://img-bbs.csdn.net/upload/201411/17/1416227675_512632.png][/img]rn[img=https://img-bbs.csdn.net/upload/201411/17/1416227685_967196.png][/img]rn 实在是无法解决这种问题了。’主项数据‘必须为超文本格式,文本格式肯定没有问题的。’主项数据‘的分隔取消选择,可以解决这个 问题,但是又有其他问题产生。rn 还有一个问题就是,超文本格式的,会自动产生一条空行,也没办法解决啊!!rn[img=https://img-bbs.csdn.net/upload/201411/17/1416227908_825134.png][/img]rn[color=#FF0000]主要是第一个问题[/color]了。求助啦
求助:一个求助问题!!!
http://upload.mop.com/user/2004/11/25/bacbe91a.gifrn这是我的软件界面。rn左边的容器用的是PictureBox,图中的小电脑图标是用Picture1.PaintPicture方法绘上去的。rn在主窗口的Load事件中,rnFor i=1 to 79rn Load image(i)rnNextrn加载的控件数组。rn现在的问题是,我要在鼠标移动到各个小图标上的时候,鼠标指针变形,单击的话,有相应的操作,如何实现???rn而我在Picture_MouseMove()里编写代码。却是在整个容器里指针变形,且不能实现操作,请高手指点。rnrn
求助,求助!! asp问题!!!
我是个学生,刚学asp没多久。 rn请问各位大虾,使用asp如何获得客户端的ip,并且享用用户发出一些提示信息??????? rn谢谢!!!!! rn
问题 问题 问题 求助 求助 求助 --关于存储过程
小弟有一个存储过程:今用asp调用,想知道它的RecordCount,但它给俺记-1条记录我晕!!rn存储过程如下:rn if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Sp_BuyQuery]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)rndrop procedure [dbo].[Sp_BuyQuery]rnGOrnCreate Procedure Sp_BuyQuery --求购信息查询rn(rn @strTitle nvarchar(50), --按标题信息rn @strDate nvarchar(20), --按时间rn @strAddress nvarchar(20), --按地点rn @strCompanyType nvarchar(20) --按企业性质rn)rnasrn--declare @strSql as nvarchar(200)(注掉就正确,否则就给我-1条记录rnselect * from tbSupplyDemandrngornSET QUOTED_IDENTIFIER OFF rnGOrnSET ANSI_NULLS ON rnGOrnrnasp调用如下:rnSet rs = Server.CreateObject("ADODB.Recordset") rnstrSql = "exec Sp_BuyQuery "&"'"&strSearchTitle&"','"&strSearchDate&"','"&strSearchAddress&"','"&strSearchCompanyType&"'"rnResponse.Write strSql & " "rnrs.Open strSql,cn,1,1rnResponse.Write "iCount11111111111=" & rs.RecordCount & " "rnResponse.endrnrn我sp中我定交了一个变量他就显示-1,如把变量去掉就正确rn有那位仁兄知道呀。急,在结等待
求助,求助,求助,求助,求助:asp.net服务器权限的问题。
用asp.net和vb.net写的网页。vs2008的环境。rnrn有两个地方涉及到服务器读写权限的问题rnrn1.一个excel的下载导入。rn 因为要在服务器固定的一个文件夹下上传一个excel文件,所加在web.config里加上了rn rn rn 这样上传没问题,本机没问题,发布后也没问题。(如果没有这句话,会出错,但没有错误提示)rn2.一个报表的打印。rn 之前试了好几种方法都是权限的问题,始终没有解决,现在试了种方法,但结果很怪异,如果有上rn 面加的web.config那句权限的代码,本机测试没问题,发布测试会报错,如果没有那句代码,则都正常,但是excel导入的时候会出同样的错误!rnrn希望有同样经历的同志们帮帮忙,谢谢啦!分析分析也可以,不一定说只有你肯定这是什么问题才可以恢复,各抒己见,畅所欲言啊。rn
C/C++内存分配问题,求助_求助_求助~~~
rnrnchar *p = NULL;rnp = (char *)malloc(100);rnfree(p);rnrn此时p指针的值是多少啊,是NULL?void?rnrn若是换成new和delete呢?
求助...求助...求助...!!!Jdk+Tomcat+MS SQL Server2000问题
j2sdk1.4.2,tomcat4.1.30 ,MS SQL Server2000个人版rntomcat服务器可以正常运行。但是涉及到连接数据库时就出现异常。rnrnSQL驱动---(jtds-0.6.jar )安了并且也把它放在tomcat\common\lib 下.classpath中也加了它的路径rnrn(mytest_db.jsp 放在Tomcat\webapps\Root\rn mytest_db.class放在Tomcat\webapps\Root\WEB-INF\classes\)rnrn连接SQL的Beanrnpackage test;rnimport java.sql.*;rnpublic class mytest_dbrnrn String sDBDriver="sun.jdbc.odbc.JdbcOdbcDriver";rn String sConnStr="jdbc:odbc:pubs";//数据源名pubsrn Connection conn=null;rn ResultSet rs=null;rnrn public mytest_db() rn tryrn Class.forName(sDBDriver);rn rn catch(java.lang.ClassNotFoundException e) rn System.err.println("Class mytest_db not found!"+e.getMessage());rn rn rn public ResultSet executeQuery(String sql) rn rs=null;rn tryrn rn conn=DriverManager.getConnection(sConnStr,"sa","");rn Statement stmt=conn.createStatement();rn rs=stmt.executeQuery(sql);rn rn catch (SQLException ex)rn rn System.err.println("aq.executeQuery:"+ex.getMessage());rn rn return rs;rn rn public ResultSet executeUpdate(String sql) rn rs=null;rn try rn rn conn=DriverManager.getConnection(sConnStr,"sa",""); rn Statement stmt=conn.createStatement();rn rs=stmt.executeQuery(sql);rn rn catch (SQLException ex)rn rn System.err.println("aq.executeQuery:"+ex.getMessage());rn rn return rs;rn rnrn测试的Jsp文件是:rn<%@ page import="java.sql.*" contentType="text/html;charset=gb2312" %>rnrn  rn  rn  <%rn rn   String sql="select job_id,job_desc from jobs";rn   ResultSet rs=test.executeQuery(sql);rn   while(rs.next())  %>rn    您的第一个字段内容为:<%=rs.getString(1)%> rn    您的第二个字段内容为:<%=rs.getString(2)%> rn  <%  %>rn  <% out.print("数据库操作成功,恭喜你"); %>rn  <% rs.close();rn  rn  %>rn  rn   rnrn运行出现错误:(浏览器中:)rnrnHTTP Status 500 - rnrn--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnorg.apache.jasper.JasperException: /mytest_db.jsp(0,3) Invalid directivern at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)rn at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)rn at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)rn at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:383)rn at org.apache.jasper.compiler.Parser.parseElements(Parser.java:795)rn at org.apache.jasper.compiler.Parser.parse(Parser.java:122)rn at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)rn at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)rn at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)rn at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)rn at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:711)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:687)rn at java.lang.Thread.run(Thread.java:534)rnrn其它的文件默认:rn请各位大狭帮帮我吧rn急死我了,这个问题困扰我好久了,我的论文马上交了,可我还是一愁莫展。rn急死我了rn大家帮我一把吧。rn谢谢谢谢谢谢。。。。。。。。。啦!!!!!!!!!rn
求助! 求助!求助! 奇怪的打印问题,
rn在自己编写的打印程序中, 打印 Arial 字体的 英文的时候, 总是出现 打印的文件不在边框中的情况, 但是, 设置成系统 缺省的字体的时候, 就没有这样的问题( 在excel中也是如此) , 不知道是怎么回事, 请各位高手帮帮忙??
问题求助
[code=javascript] rn$.getJSON("js/question.json",function(data, status, xhr)rn var i = 0;rn // alert(data.questions[1].ID)rn while(data[i])rn rn $("tr").last().after(" "+data[i].ID+" "+data[i].classify+" "+data[i].question_content+" "+data[i].question_tag+" "); rn i++;rn rnrn $("tr").mouseover(function()rn //alert("click success")rn alert(this);rn $(this).attr("style",$(this).attr("style")+";word-break:break-all");rn );rn[/code]rnrnrn上面的$("tr").mouseover(function()rn没有走进去,不知道为什么?没有找到tr
求助的问题
1 . codebase 是否可以为任何目录?用相对目录“../WEB-INF/classes”为什么不对?rnrn2 。 当type="bean"时为什么会出现如下的错误,当type="applet" 时没什么问题的。rn java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)rnrn at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)rnrn at java.security.AccessController.checkPermission(AccessController.java:401)rnrn at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)rnrn at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)rnrn at java.lang.System.getProperty(System.java:572)rnrn at GenTree$BookInfo.(GenTree.java:100)rnrn at GenTree.createNodes(GenTree.java:152)rnrn at GenTree.(GenTree.java:34)rnrn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rnrn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rnrn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rnrn at java.lang.reflect.Constructor.newInstance(Constructor.java:274)rnrn at java.lang.Class.newInstance0(Class.java:306)rnrn at java.lang.Class.newInstance(Class.java:259)rnrn at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)rnrn at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1775)rnrn at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)rnrn at sun.applet.AppletPanel.run(AppletPanel.java:292)rnrn at java.lang.Thread.run(Thread.java:536)rn
问题求助!!
怎样才能在自己的程序中向系统日志中写东西。就是在察看日志时能看到的那个。rn
问题,求助
rn怎样使用C#来判断一定时间内没有键盘反映,鼠标活动。类似于屏保程序。
求助问题
import org.apache.commons.beanutils.BeanUtils;rnrnimport org.apache.commons.(这个报错,好像是没包,拿别人的代码,不知道这是什么包和怎么导入?)
求助,的问题。
1。要求是需要定时到数据库里面去取最新状态表示。rn2。取到最新状态后,要判断当前字幕是否滚动完了,完了之后把最新状态的字幕显示出来滚动。rnrn怎么才能判断当前字幕滚动完了呢?
问题求助?
我用的discuz的论坛是win2003的系统,每次服务器起来10小时左右,论坛老是有10055和10048的mysql链接错误,重启服务器后就没问题了,但过8,9个小时还是这样,我在网上查了查好多人有这个情况,但也没找到想要的解决方法,还请各位老大 帮忙 看看是什么原因,php和mysql我不怎么懂,不知是什么原因,总不能老是重启服务器吧,谢谢!
问题求助!!!
打开一个dbf数据库,出现提示“not a table”rn怎么回事呀?
问题!!求助!
怎样用asp.net使用adsi,详细一点好么?哪儿能找到比较详细的资料!
问题求助!!!
Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdatingrnrn For Each valueEntry As DictionaryEntry In CType(e.NewValues, IEnumerable)rn If ((valueEntry.Key.ToString = "BT") And (valueEntry.Value.ToString().IndexOf(",") > 0)) Thenrn e.Cancel = Truern Label1.Text = "输入错误!!"rn End Ifrn Next valueEntryrn End Subrnrnrnrn If ((valueEntry.Key.ToString = "BT") And (valueEntry.Value.ToString().IndexOf(",") > 0)) Then这一行说使用"new"关健字创建对象实例是什么意思???????rn
[求助]问题
我的程序是这样的:rn<%@ page contentType="test/html;charset=gb2312"%>rnrn rn rn rn rn rn 看到内容了吗?rn rnrnrnrn而H1.html是一个很简单的页面rnrnrn rn H1.htmlrn rn rn rn rn rn rnrn rn rn rn This is my HTML page. rn rnrnrnrnrn本应该就一个jsp嵌套一个网页输出就完了。可是却显示不了。结果是文件下载。都不知道什么回事,请帮帮忙看下 rnrnrnrn有人说是因为有在里面。但我试了,还是不行,而且即使在里面有也是可行的。rnrn<%@ page language="java" pageEncoding="gb2312"%>rnrn rn rn My JSP 'products.jsp' starting pagern rnrn rn rn rn this is the pagern rn rnrnrnrnrnrnincludeforward.jsprn<%@ page contentType="text/html;charset=gb2312"%>rnrnrn rn My JSP 'H2.jsp' starting pagern rn rn rn rn rn rn rn 总额rn rn rn rn rn rnrn rnrnrn迷惑中。。。。。
问题求助!
void CChildView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) rnrn // TODO: Add your message handler code here and/or call defaultrn if(m_bGamePause)rn return;rn if(m_Objects[MYSHIP].GetCount()==0)//my ship is not existrn return;rn//double "my ship"rn CMyShip* pShip1 = (CMyShip*)m_Objects[MYSHIP].GetHead(); // remember that our ship1 is the first object[MYSHIP] in object listrn CMyShip* pShip2 = (CMyShip*)m_Objects[MYSHIP].GetTail(); // remember that our ship2 is the last object[MYSHIP] in object listrnrn switch(nChar)rn rn case VK_LEFT: // turn leftrn pShip1->SetMotion(-1);rn break;rn rn case VK_RIGHT: // turn rightrn pShip1->SetMotion(1);rn break;rnrn case VK_NUMPAD2: // throw bomb from middlern if( m_Objects[MY_BOMB].GetCount()GetPos().x+SHIP_WIDTH/2-BOMB_WIDTH/2, 9));rn break;rnrnrn case VK_NUMPAD1:rn case VK_SPACE:rn // throw bomb on left sidern sndPlaySound((LPCTSTR)LockResource(m_pSndexplo), rn SND_MEMORY | SND_ASYNC | SND_NODEFAULT);rn if( m_Objects[MY_BOMB].GetCount()GetPos().x-BOMB_WIDTH/2, 4));rn break;rn rn case VK_NUMPAD3:rn // throw bomb on right sidern if( m_Objects[MY_BOMB].GetCount()GetPos().x+SHIP_WIDTH-BOMB_WIDTH/2, 3));rn break;rn rnrn //switchrnrn// CWnd ::OnKeyDown(nChar, nRepCnt, nFlags);rnrnrn1>ChildView.obj : error LNK2019: 无法解析的外部符号 __imp__sndPlaySoundA@8,该符号在函数 "protected: void __thiscall CChildView::OnKeyDown(unsigned int,unsigned int,unsigned int)" (?OnKeyDown@CChildView@@IAEXIII@Z) 中被引用rn1>.\Debug\ShipDemo.exe : fatal error LNK1120: 1 个无法解析的外部命令rn这错误怎么改啊?rn内容太长了,不能全发上来
问题求助!!!!
输入一个数字,能显示出某数组内的的某组数据,简单说来就是实现查找的功能~rn哪位高手能教我如何实现这一功能.
问题,求助!
为什么修改不了呀rn<%szqx=request("szqx")rnszqy=request("szqy")rnlounam=request("lounam")rndizhi=request("dizhi")rnfwlx=request("fwlx")rnhuxing=request("huxing")rnjzmj=request("jzmj")rnmm=request("mm")rnyzj=request("yzj")rnfkyq=request("fkyq")rnxxms=request("xxms")rnyxqx=request("yxqx")rnlxr=request("lxr")rnlxtel=request("lxtel")rnemail=request("email")rn sql="update free_yanzheng set szqx='"+szqx+"',szqy='"+szqy+"',lounam='"+lounam+"',dizhi='"+dizhi+"',fwlx='"+fwlx+"',huxing='"+huxing+"',jzmj='"+jzmj+"',mm='"+mm+"',yzj='"+yzj+"',fkyq='"+fkyq+"',xxms='"+xxms+"',yxqx='"+yxqx+"',lxr='"+lxr+"',lxtel='"+lxtel+"',email='"+email+"' where id='" & id & "'"rnrnset rs=conn.execute(sql) rn%>rnrn以上代码为什么修改后还是原来的记录并没有修改,怎么回事呀rn请帮忙
求助 <> 和 not in的问题
表数据如下:rn--------------------------------------------------------------rn ID NAME ADDR ROWIDrn1 1 test addr1 AAARGiAAEAAAAA+AAArn2 1 test addr2 AAARGiAAEAAAAA/AAArn3 1 test addr3 AAARGiAAEAAAAA/AABrn4 2 gogogo addr1 AAARGiAAEAAAAA+AABrn5 2 gogogo addr2 AAARGiAAEAAAAA/AACrn6 3 aaaaaf bbbbbb AAARGiAAEAAAAA+AACrn--------------------------------------------------------------rn现在想删除重复记录。重复列为ID和NAME(测试用,无主键)rnrn思路:获得全部重复记录,分组并取得最小rowid,删除其他rowid的行rn=================================================================rnSQL1:rnselect t.*, rowidrnfrom emp trnwhere t.rowid not in (select min(rowid)rn from emp ern where e.id = t.idrn and e.name = t.namern group by e.id, e.namern having count(*)>1)rnrn查询结果如下:rn ID NAME ADDR ROWIDrn[color=#FF0000]1 3 aaaaaf bbbbbb AAARGiAAEAAAAA+AAC[/color]rn2 1 test addr2 AAARGiAAEAAAAA/AAArn3 1 test addr3 AAARGiAAEAAAAA/AABrn4 2 gogogo addr2 AAARGiAAEAAAAA/AACrn--------------------------------------------------------------rnSQL2:rnselect t.*, rowidrnfrom emp trnwhere t.rowid <> (select min(rowid)rn from emp ern where e.id = t.idrn and e.name = t.namern group by e.id, e.namern having count(*)>1)rn查询结果如下:rnrn ID NAME ADDR ROWIDrn1 1 test addr2 AAARGiAAEAAAAA/AAArn2 1 test addr3 AAARGiAAEAAAAA/AABrn3 2 gogogo addr2 AAARGiAAEAAAAA/AACrn--------------------------------------------------------------rn问题:为何SQL1,2取得结果不同,跪求原理。望大神告知。
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池