I'm collecting metadata using the sys.* views, and according to the documentation, the sys.identity_columns view will return the seed and increment values like so.
CREATE TABLE ident_test (
test_id int IDENTITY(1000,10),
other int
)
SELECT name, seed_value, increment_value
FROM sys.identity_columns
WHERE object_id = OBJECT_ID( '...
I'm using system catalog views such as SYS.ALL_ OBJECTS, SYS.FOREIGN_KEYS etc. to get information about my database structure in MS SQL 2005.
Are there equivalent functions/views for MySQL (v. 5) servers?
...
Is it possible to have a relationship from a user table to a system table view? To give context, I would like the values of a column in one of my tables to be restricted to the column names of another one of my tables, which seems easiest to do by going through the system view that houses the column names of the second table.
So, using ...
Something like:
SELECT * FROM sys.functions
...
I have a package:
CREATE PACKAGE my_pkg
IS
g_var NUMBER;
END;
/
Is there any way I can query SYS views, to find that this package has this global variable? I'm interested in explicit variable name and data type.
P.S.
Parsing user_source does not count.
Edit: I would like to do that without introducing getter/setter functions.
...