-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add case for information_schema.referenctial_constraints(1.1-dev) (#1…
- Loading branch information
1 parent
bab0a03
commit 7dd603b
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
select information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA, | ||
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_NAME, | ||
information_schema.REFERENTIAL_CONSTRAINTS.TABLE_NAME, | ||
information_schema.REFERENTIAL_CONSTRAINTS.REFERENCED_TABLE_NAME, | ||
information_schema.REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_NAME, | ||
information_schema.REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_SCHEMA, | ||
information_schema.KEY_COLUMN_USAGE.COLUMN_NAME | ||
from information_schema.REFERENTIAL_CONSTRAINTS | ||
join information_schema.KEY_COLUMN_USAGE | ||
on (information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA = | ||
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_SCHEMA and | ||
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_NAME = | ||
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_NAME and | ||
information_schema.REFERENTIAL_CONSTRAINTS.TABLE_NAME = | ||
information_schema.KEY_COLUMN_USAGE.TABLE_NAME) | ||
where (information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA in ('plat_content') or | ||
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA in ('plat_content')) | ||
order by information_schema.KEY_COLUMN_USAGE.CONSTRAINT_SCHEMA asc, | ||
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_NAME asc, | ||
information_schema.KEY_COLUMN_USAGE.ORDINAL_POSITION asc; | ||
constraint_schema constraint_name table_name referenced_table_name unique_constraint_name unique_constraint_schema column_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
select information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA, | ||
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_NAME, | ||
information_schema.REFERENTIAL_CONSTRAINTS.TABLE_NAME, | ||
information_schema.REFERENTIAL_CONSTRAINTS.REFERENCED_TABLE_NAME, | ||
information_schema.REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_NAME, | ||
information_schema.REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_SCHEMA, | ||
information_schema.KEY_COLUMN_USAGE.COLUMN_NAME | ||
from information_schema.REFERENTIAL_CONSTRAINTS | ||
join information_schema.KEY_COLUMN_USAGE | ||
on (information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA = | ||
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_SCHEMA and | ||
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_NAME = | ||
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_NAME and | ||
information_schema.REFERENTIAL_CONSTRAINTS.TABLE_NAME = | ||
information_schema.KEY_COLUMN_USAGE.TABLE_NAME) | ||
where (information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA in ('plat_content') or | ||
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA in ('plat_content')) | ||
order by information_schema.KEY_COLUMN_USAGE.CONSTRAINT_SCHEMA asc, | ||
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_NAME asc, | ||
information_schema.KEY_COLUMN_USAGE.ORDINAL_POSITION asc; |