select table3.name
 from table1,table2,table3
 where table1.libplace=table2.libplace
   and table2.gateno=table3.gateno
   and table1.[description]='文科图书馆'

解决方案 »

  1.   

    select c.name from table1 a inner join table2 b on a.libplace=b.libplace inner join table3 c on b.gateno=c.gateno where a.description='文科图书馆'
      

  2.   

    create table table1 
    (libplace int,description char(20))
    insert table1
    select 1,'文科图书馆'
    union all
    select 2,'理科图书馆'create table table2 
    (gateno char(5),libplace int)
    insert table2
    select '01',1
    union all
    select '02',1
    union all
    select '03',2
    create table table3 
    (name char(10),gateno char(5))
    insert table3
    select '张三','01'
    union all
    select '李四','02'
    union all
    select '王五','03'
    select a.name from table3 a 
    join table2 b on a.gateno=b.gateno 
    join table1 c on b.libplace=c.libplace
    where c.description = '文科图书馆'name       
    ---------- 
    张三      
    李四      (所影响的行数为 2 行)