Multi-table connection SQL Writing

xiaoxiao2021-03-06  14

Oracle8

Select a. *, b. * from a, b where A.ID ( ) = B.ID - equivalent to the left

Select a. *, b. * from a, b where a.id = B.ID ( ) - equivalent to the right connection

Oracle9

Support for the above writing, also adding Leftjoin, Right Join, etc.

Select a. *, b. * from a left join b on a.id = B.ID

Select a. *, b. * from a right join b on A.Id = B.ID

SQLServer

Select a. *, b. * from a, b where A.id * = B.ID - equivalent to the left

Select a. *, b. * from a, b where a.id = * B.ID - equivalent to the right connection

Select a. *, b. * from a left join b on a.id = B.ID

Select a. *, b. * from a right join b on A.Id = B.ID

转载请注明原文地址:https://www.9cbs.com/read-67577.html

New Post(0)