select * from a,b where a.id = b.id 算是内连接吗?

解决方案 »

  1.   

    select * from a,b where a.id = b.id 
    --等價
    select * from a inner join b on a.id = b.id 
      

  2.   

    看这个:弄个例题,直观一点。两个表: 
    --表stu 
    id name 
    1, Jack 
    2, Tom 
    3, Kity 
    4, nono 
    --表exam 
    id grade 
    1, 56 
    2, 76 
    11, 89 内连接 (显示两表id匹配的) 
    select stu.id,exam.id,stu.name, exam.grade from stu inner join exam on stu.id=exam.id 
    stu.id exam.id name grade 
    -------------------------------- 
    1 1 Jack 56 
    2 2 Tom 76 
      

  3.   

    算,你在SQL SERVER 2005写个连表的视图,然后再打开看这个视图的代码的时候它就自动给你写成内连的样子了。