How to find owner of sequence in Postgresql 9.6 - sequence

How can I display the owner of sequences in PostgreSQL 9.6 with an SQL query?
Since PostgreSQL version 10 there is a pg_cataglog.pg_sequence table, how was it before?

Related

Does Oracle Apex support table partitioning?

I'm new to Oracle and Apex, and I'm building a table that will potentially become very large over time.
It would be ideal to partition by date range, and then subpartition by hash.
Does Apex support table partitioning?
Googling yielded no results, which makes me think it's unsupported.
(All I could find was Oracle DB articles, not Apex.)
Apex is just an application layer on top of your Oracle database. It does not know about how a table is organised. I have many applications using partitioned tables, this is not an issue.

Do Ingres and Vectorwise Databases support functionality similar to TRUNCATE table in SQL Server? If so, what is the syntax?

Trying to find if there is something similar to TRUNCATE TABLE in these 2 database systems.
MODIFY mytable TO TRUNCATED
is the equivalent SQL for Ingres/Vector/ActianX

Oracle 12c documentation for changes / new features to SQL

I just found out that Oracle 12c supports correlating a query several levels deep which is unsupported in 11g and previous versions.
select
*
from
tab1 a
where
not exists
(select
*
from
(select
*
from
tab2 b
where a.X = b.X))
But I could not find this documented in Oracle website. Is there any other such hidden SQL features added to Oracle 12c? Are all such changes to SQL in 12c documented somewhere?
To explain this we need to dive into history a little bit.
Ability to use correlated sub-queries with more than 1 level was also in Oracle 10g R1 and it was properly documented (https://docs.oracle.com/cd/B14117_01/server.101/b10759/queries007.htm) back those days...
Oracle performs a correlated subquery when a nested subquery
references a column from a table referred to a parent statement any
number of levels above the subquery.
... but it was not properly working. :)
So starting with Oracle 10g R2 this functionality was disabled and documentation had changed.
Also (if you have an access) you can see Bug 15990897 : QUERY WITH CORRELATED VARIABLE USED IN 2ND LEVEL SUBQUERY FAILS WITH ORA-904 on Metalink (Fixed in Product Version 12.1.0.1.0). I'm not sure why it's considered as a bug given that it works according to documentation (10g R2, 11g R1, 11g R2) but that is how it is.
So, functionality was disabled after 10.1 and before 12.1 but documentation even for 12.2 (https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sqlrf/Using-Subqueries.html) says
Oracle performs a correlated subquery when a nested subquery
references a column from a table referred to a parent statement one
level above the subquery.
Cut a long story short, this functionality is enabled in 12c R1 and 12c R2 but documentation is not fixed and apparently there is no mentioning about this improvement in New Features guide.
PS. As far as I remember standard SQL 2003 allows correlation only to one level deep - everyone is welcome to check (http://www.wiscorp.com/sql_2003_standard.zip).
But Oracle has a lot of improvements above the standard anyway.

Oracle 12 C missing Sample schemas

I installed Oracle 12C, now I am trying to install sample schemas but some of the scipts for sample schema are missing.
Where can I download the scipts for sample schemas of ORACLE 12 C
What I found is , Oracle 12C is not stable, it's missing some files.. I cleaned my system and installed Oracle 11G and I get all the required files. 12C is kind a new, may be it needs more time to get stabilized. It's missing major schema like HR etc...

In DB2 is there a length restriction on the SQL statement?

In some older versions of DB2, I know there's a limit to how many characters can be in the SQL passed to the database. (32767, I believe) -- is this the case in the latest versions of DB2?
As of version 8.2, 2MB is allowed. See: SQL statement size limit increased to 2 MB