易截截图软件、单文件、免安装、纯绿色、仅160KB

简单SQL语句 - Oracle / 基础和管理

select u,c,u1 
from umc_user_base u,umc_company_base c
left join umc_user_base u1
on u1.CREATE_USER_ID = u.id  
where 1=1
and u.umc_Company_Id = c.id 
and nvl(c.is_Deleted, 0) != 1 


请大家帮我看看 哪里有问题啊?
执行有错误
不等于符号错误 换成<>

引用

不等于符号错误 换成<>

sorry

select *  
from umc_company_base c,umc_user_base u,
left join umc_user_base u1
on u1.CREATE_USER_ID = u.id  
where 1=1
and u.umc_Company_Id = c.id  
and nvl(c.is_Deleted, 0) != 1; 
这样试试

select u,c,u1  
from umc_user_base u,umc_company_base c

这里识别不了 u,c,u1 ,分不清楚是哪个表的字典,


select u,c,u1  
from umc_user_base u,umc_company_base c
left join umc_user_base u1
on u1.CREATE_USER_ID = u.id  
where 1=1
and u.umc_Company_Id = c.id  
and nvl(c.is_Deleted, 0) != 1 
--------------------
问题大了,表明不能作为字段的,你既然为umc_user_base起了个u的别名,就要保证这个表里没有u这个字段,否则你只能用
select u."u"
from umc_user_base u
这样的查询形式

select u.*,c.*,u1  
from umc_user_base u,umc_company_base c
left join umc_user_base u1
on u1.CREATE_USER_ID = u.id  
where 1=1
and u.umc_Company_Id


相关问答:

Asp+sql server问题 - Web 开发 / ASP

我一个项目,有个插入操作,具体是这样的:
我有进货信息表。在出货时选择相应的进货信息,输入数量,选择部门后,点保存按钮,由于网络延时,点一下没有反映,于是用户就又点一下,导致一次插入了两条记录:
例: ......

数据以xml格式返回 - MS-SQL Server / 应用实例

从数据库中查询一张表的数据
select 部门,姓名 from tb
如何才能生成下面的xml格式
XML code:
<folder state="unchecked" label="全部">
   <folder state="unchecked&qu ......

求一sql语句 - MS-SQL Server / 疑难问题

现在有两张表:文章主表A(articleId,articleTitle),文章评论表B(commentId,articleId,commentTitle)
现在我想实现这样的功能:列出文章列表,其中每篇文章标题下面列出此文章的前2个文章评论,请问sql语句怎么写啊 ......

oracle 安装 01092 错误 - Oracle / 基础和管理

oracle 11g 安装 01092 错误,
日志信息:
[oracle@linux trace]$ vi alert_orcl.log 
MMON started with pid=14, OS id=9089
RESETLOGS after incomplete recovery UNTIL CHANGE 522752
Errors in file / ......

MS SQL作业问题 - MS-SQL Server / 应用实例

如何在SQL2005中设定定时作业,比如说定时清理某些表的数据,
或者是定时的将某些表的数据导出excel!
在线等待,急急急,最好是详细步骤!
之前我做的作业有点问题!
帮UP

参考:http://hi.baidu.com/toiota ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号