Saturday, 1 October 2011

Find a table knowing a column name

  Exactly know the column name,
  • SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = 'YOURCOLUMN

  if you're unsure exactly what the column is named,but you suspect you know part of the
  name, then try...
  • SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME  like  '%YOURCOLUMN%'

No comments:

Post a Comment