I want to get all table names and fields in that table from a particular database.
Please help me to solve this.
I want to get all table names and fields in that table from a
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try looking at the
sys.objectsandsys.columnstables:Would give you all of the tables in that database (Type U)
Would give you all of the tables in that database and the column names. You could filter on these queries and do
WHERE so.name = 'Your Table'http://msdn.microsoft.com/en-us/library/ms190324.aspx