May 3, 2013

Search for column names in a SQL table

Search for column names in a SQL table:


select column_name,CHARACTER_MAXIMUM_LENGTH from information_schema.columns
where table_name = 'myTable'
AND column_name LIKE '%cate%'
order by ordinal_position

No comments:

Post a Comment

Be the first to comment on this post.