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

又来问大大们了,还是关于sqlite的问题

我现在有两个表
第一个表为
id          title      content   
1          34234        234234

第二个表为

id        Tcontent      time      tab1ID
1            嘉陵江    2009-1-1      1

怎样把表二的time加入表一  然后select排出time的升序

我连接两表都搞晕了  请大大们帮帮忙
SQL code:
select *
from 第一个表 a ,第二个表 b
where a.id=b.tab1ID
order by b.time


SQL code:
select *
from 第一个表 a inner join 第二个表 b on a.id=b.tab1ID
order by b.time


select *
from A1 a inner join A2 b on a.id=b.tab1ID
order by b.time

select a.*,b.time
from a , b
where a.id=b.tab1ID
order by b.time

select a.*,b.time
from 表1 a inner join 表2 b on a.id=b.tab1id
order by b.time   

以上方法可以查出  但是如果表2没有记录 查询的结果是空 

有没有办法查出如果b.time为空自动加上“空” 然后表1的记录依然显示啊。各位帮帮忙!!




相关问答:

使用飞信虚拟.net环境,在使用SQLite时为什么报错呢

C# code:

System.Data.SQLite.SQLiteConnection conn = new SQLiteConnection(@"acs.db");
try
{
conn.Open();
}
......

用过SQLite的朋友和玩过批处理的朋友进来看一下.


    偶想备份数据表,写了一个批处理,有现成的数据库。但是批处理写到一半不会了,还请帮忙看看,怎么往下。。。

    @echo off
    echo 正在系统数据库备份,请稍 ......

sqlite在vs2005中的使用报错

在vs2005中引用了using System.Data.SQLite;
定义了一个连数据库连接变量public SQLiteConnection dBConn;
就报下面这个错误了.
The type 'System.Data.Common.DbConnection' is defined in an ass ......

sqlite的空值查询怎么写,能者得分

sqlite的空值查询怎么写,能者得分
select * from tt where f1 is null

select * from yourTable where col is null;

SQL code:
sqlite> create table Aoqun (id int primary key,col1 int);
sqlite> ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号