On Sep 1, 6:25 pm, Dave Howell <[email protected]> wrote:
> On the other hand, it was really easy for me to Google up the query I needed
> for PostgreSQL, so I would imagine it wouldn't be too hard to find out how to
> do it for many of the other main databases.
I ran the same query on MS SQL (changing using to on since using is
not supported) and it generated the correct result. Can someone please
test MySQL and SQLite. Thanks!
SELECT
tc.constraint_name, kcu.column_name
FROM
information_schema.table_constraints AS tc
JOIN
information_schema.key_column_usage AS kcu
on
tc.constraint_name = kcu.constraint_name
WHERE
constraint_type = 'FOREIGN KEY' AND tc.table_name='orders'
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.