我现在有两个表
第一个表为
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的记录依然显示啊。各位帮帮忙!!
相关问答:
C# code:
System.Data.SQLite.SQLiteConnection conn = new SQLiteConnection(@"acs.db");
try
{
conn.Open();
}
......
SQLITE下如何删除内容中的第一个<br>
SQLITE下不好用
提示:
sqlite error
no such function: stuff
怎么解决?
SQL code:
--------------------------------------------- ......
小弟 弄点东西可是调用 sqlite3_prepare 这个函数 select 就好使 只要 改变数据库 的就不行 比如insert 之类的 谁来帮个忙啊 请问这是什么原因 啊 用 c 去实现的
你用的什么工具啊?
把你自己的代码发 ......
sqllite里面有什么方法把int转换为十六进制存储的呢?
例如,strftime('%s', 'now') 得到1263777947,当前的秒数,我想存储为它的十六进制表示"4B53B89B"
谢谢..
其实我是想strftime ......