从HGDB 1.3版本开始,瀚高数据库中添加了dual表:
highgo=# select version() from dual;
version
------------------------------------
HighGo Database 3.0.2 Linux 64-bit
(1 row)
highgo=# select version();
version
------------------------------------
HighGo Database 3.0.2 Linux 64-bit
(1 row)
highgo=#
highgo=# select 1+1 AAA from dual;
aaa
-----
2
(1 row)
highgo=# select 1+1 "AAA" from dual;
AAA
-----
2
(1 row)
highgo=# select 1+1 as "AAA" from dual;
AAA
-----
2
(1 row)
========================================================================================================
postgres9.6@[local]:5432 postgres# select version();
version
---------------------------------------------------------------------------------------------------------
PostgreSQL 9.6.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit
(1 row)
Time: 13.233 ms
postgres9.6@[local]:5432 postgres# select 1+1 as AAA;
aaa
-----
2
(1 row)
Time: 9.708 ms
postgres9.6@[local]:5432 postgres# select 1+1 "AAA";
AAA
-----
2
(1 row)
Time: 0.222 ms
postgres9.6@[local]:5432 postgres# select 1+1 as AAA from dual;
ERROR: relation "dual" does not exist
LINE 1: select 1+1 as AAA from dual;
^
Time: 0.236 ms
highgo=# select version() from dual;
version
------------------------------------
HighGo Database 3.0.2 Linux 64-bit
(1 row)
highgo=# select version();
version
------------------------------------
HighGo Database 3.0.2 Linux 64-bit
(1 row)
highgo=#
highgo=# select 1+1 AAA from dual;
aaa
-----
2
(1 row)
highgo=# select 1+1 "AAA" from dual;
AAA
-----
2
(1 row)
highgo=# select 1+1 as "AAA" from dual;
AAA
-----
2
(1 row)
========================================================================================================
postgres9.6@[local]:5432 postgres# select version();
version
---------------------------------------------------------------------------------------------------------
PostgreSQL 9.6.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit
(1 row)
Time: 13.233 ms
postgres9.6@[local]:5432 postgres# select 1+1 as AAA;
aaa
-----
2
(1 row)
Time: 9.708 ms
postgres9.6@[local]:5432 postgres# select 1+1 "AAA";
AAA
-----
2
(1 row)
Time: 0.222 ms
postgres9.6@[local]:5432 postgres# select 1+1 as AAA from dual;
ERROR: relation "dual" does not exist
LINE 1: select 1+1 as AAA from dual;
^
Time: 0.236 ms