Innerjoin是兩張表做交連后里面條件相同的部分記錄產生一個記錄集,
union是產生的兩個記錄集(字段要一樣的)并在一起,成為一個新的記錄集
SelectA.Field1,B.field2fromTable1AinnerjoinTable2Bona.Field2=b.Field2where..........
SelectField1fromTable1unionSelectField2fromtable2
方案二、
select a.id,a.title,b.content from 表格1 as a,表格2 as b where a.id=b.id order by a.id
rs("id")
rs("title")
rs("content")
另:
新建一個表xxx
sql="insertintoxxxselectP.id,P.title,M.contentfrompicturePinnerjoinmiaoshuMonP.id=M.id"
conn.executesql
|
新聞熱點
疑難解答