W
W1979
Unregistered / Unconfirmed
GUEST, unregistred user!
有表a01:
code name
-----------------------
表a04:
code date
----------------------
有两个sql 语句:
select a04.date from a04
where a04.code like '045881'
结果为:99-12-30
和
select a01.code from a01
where a01.name like 'w1979'
结果为045881
a01,a04两个表 都有code字段,我把两句组合起来:
select
a04.date
from
a04
where
a04.code like (select a01.code from a01 where a01.name
like 'w1979')
结果却查不到东西,请问我错在哪里?
code name
-----------------------
表a04:
code date
----------------------
有两个sql 语句:
select a04.date from a04
where a04.code like '045881'
结果为:99-12-30
和
select a01.code from a01
where a01.name like 'w1979'
结果为045881
a01,a04两个表 都有code字段,我把两句组合起来:
select
a04.date
from
a04
where
a04.code like (select a01.code from a01 where a01.name
like 'w1979')
结果却查不到东西,请问我错在哪里?