Having is different in Oracle and MySQL.
In Oracle, having must be used in combination with group by, but in MySQL, the situation is different and can be used separately.
C: \ Documents ents and Settings \ guogang> sqlplus test/test
SQL * Plus: Release 10.2.0.1.0-Production on Tuesday August 12 09:09:58 2014
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connect:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from test1 having owner = 'sys ';
Select * from test1 having owner = 'sys'
*
Row 3 has an error:
ORA-00979: Not a group by expression
SQL> select owner, count (1) from test1 group by owner having owner = 'sys ';
Owner count (1)
----------------------------------------
SYS 30754
Mysql> select * from test having id> 98;
+ ------ + ------------- +
| Id | create_time |
+ ------ + ------------- +
| 99 | 2014-08-12 |
| 100 |
+ ------ + ------------- +
2 rows in set (0.00 sec)
Mysql> select id, count (1) from test group by id having id> 98;
+ ------ + ---------- +
| Id | count (1) |
+ ------ + ---------- +
| 99 | 1 |
| 1 | 100 |
+ ------ + ---------- +
2 rows in set (0.00 sec)
Oracle 11g installation manual on RedHat Linux 5.8 _ x64 Platform
Installing Oracle 12C in Linux-6-64
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian