国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

MySQL與Oracle 差異比較之七 其它

2020-10-29 21:47:51
字體:
供稿:網(wǎng)友

其它

編號 類別 ORACLE MYSQL 注釋
1 內(nèi)連接的更改

1、
select a.*, b.*, c.*, d.*
  from a, b, c, d
 where a.id = b.id
   and a.name is not null
   and a.id = c.id(+)
   and a.id = d.id(+)
"(+)"所在位置的另一側(cè)為連接的方向,
所以上面的例子1是左連接。
以下的例子2既是右連接。

2、
select a.*, b.*, c.*, d.*
  from a, b, c, d
 where a.id = b.id
   and a.name is not null
   and a.id(+) = c.id

方法一
select a.*, c.*, d.*
  from a
  left join(c, d) 
  on (a.id = c.id and a.id = d.id), b
 where a.id = b.id
   and a.name is not null
方法二
select a.*, c.*, d.*
  from a
  left join c on a.id = c.id
  left join d on a.id = d.id, b
 where a.id = b.id
   and a.name is not null
oracle sql語句和mysql sql語句有一定的區(qū)別. 
1. oracle左連接,右連接可以使用(+)來實現(xiàn). 
   Mysql只能使用left join ,right join等關(guān)鍵字. 
2 最后一句執(zhí)行的sql statement所取得或
影響的條數(shù)
SQL%ROWCOUNT 執(zhí)行select語句后用: FOUND_ROWS()
執(zhí)行update delete insert語句后用: 
ROW_COUNT(). 
oracle中: 
sql 表示最后一句執(zhí)行的 SQL Statement, rowcount表示 主站蜘蛛池模板: 临高县| 安塞县| 安平县| 高碑店市| 民丰县| 格尔木市| 咸宁市| 西宁市| 菏泽市| 洛隆县| 光山县| 孟州市| 晋宁县| 互助| 贵德县| 石阡县| 鸡泽县| 稷山县| 永州市| 吉木萨尔县| 永昌县| 铁力市| 昌都县| 临夏市| 建平县| 盖州市| 潜山县| 安龙县| 南漳县| 沙河市| 保山市| 贵南县| 平江县| 汝阳县| 涞源县| 海阳市| 美姑县| 罗田县| 景德镇市| 云浮市| 洪江市|