Information schema for a Table

0

Please login or register to vote for this query.

(click on this box to dismiss)

DON'T EDIT THIS QUERY! YOU HAVE LINKED TO IT FROM HERE: http://meta.stackexchange.com/a/2678/158100 REMEMBER?

Stack Overflow

Q&A for professional and enthusiast programmers

select c.Table_Name
     , c.column_name
     , k.*
from INFORMATION_SCHEMA.Columns c
inner join INFORMATION_SCHEMA.KEY_COLUMN_USAGE k
on k.table_name = c.table_name

select * from INFORMATION_SCHEMA.KEY_COLUMN_USAGE k

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results