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

sql语句 查询 - 其他数据库开发 / MySQL/Postgresql

SQL code:

select count(subid) as subnum,st.id,t.title,t.content from subtopics st JOIN topics t ON st.id=t.id
where st.id in (select id from topics where viewid='1')
group by st.id


我的链接条件 为t.id=st.id 但t.id对应的st.id有可能没没有 但我想显示t 表 的内容 SQL语句怎么写  



select count(subid) as subnum,t.* from subtopics st right outer JOIN topics t ON t.id=st.id
where t.id in (select id from topics where viewid='1')
group by t.id
order by date desc

我也试出来了 还是谢谢大家 O(∩_∩)O~


相关问答:

jsp链接sql2000的疑问?



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

mysql数据库 - Java / Java相关

CREATE DATABASE ADDRESSLIST;
USE ADDRESSLIST;
DROP TABLE IF EXISTS FRIEND;
CREATE TABLE FRIEND
  (FRIEND_ID INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY ,
FRIEND_NAME VARCHAR(20) NOT N ......

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

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

参考:http://hi.baidu.com/toiota ......

SQL语句问题 - MS-SQL Server / 疑难问题

请教高手:
 以下是数据库中的三条记录,英文为字段名称  
  id planname TaskBeginTime Status
329 2010年03 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号