zoukankan      html  css  js  c++  java
  • 初学oracle(二)

    第一个问题:

    oracle 资源正忙,要求指定nowait

    当进行删除表的数据或是删除表时报出此错。

    原因:其他地方占用了此资源,致使不能对它进行操作。

    第二个问题:

    oracle 表间连接返回0行数据,前提是数据库中有符合条件的数据,可是以查询时却返回0行。

    这个问题困扰了一天多时间,终于在高手的指点下找到答案。

    select * from testuser.tablea where trim(aid) in (select trim(aid) from testuser.tablec where cnd='2009')

    只要在字段上加上trim()函数,使两边字段完全匹配才能得到想要的数据。

    select a.aid,a.aname,c.cnd from testuser.tablea a join  testuser.tablec  c  on trim(a.aid)=trim(c.aid)
    where c.cnd='2009'

    表间连接亦是如此。

  • 相关阅读:
    UVa-10317
    UVa-1595
    UVa-10391
    UVa-10763
    UVa-10935
    UVa-1594
    UVa-1593
    从CSDN搬过来了
    memset会显著增加时间和空间的消耗吗
    memset对数组的初始化
  • 原文地址:https://www.cnblogs.com/liyan/p/2000136.html
Copyright © 2011-2022 走看看