• Register
0 votes

Problem :

I am very new to SQL.I and my colleague have recently joined SQL project now I have a table on my SQL Server and I want to export the structure of the table so that I can send it to my colleague. Which SQL command should one fire to get the required table structure? Please note that I don't have any access to the SQL Server Management Studio.

7 5 2
3,870 points

1 Answer

0 votes

Solution :

I also had faced a same issue in when I started working on SQL. I did lot of research on it and found the solution on my issue. I can say that it is the very common problem with the people getting started with SQL.

You can try below command

sp_help '<TableName>'

It will give you the required structure of your table

Also you can try to use a information_Schema to get the detailed information, as shown below


You should check this out http://msdn.microsoft.com/en-us/library/ms186778.aspx


Visual Studio has many tools for designing and browsing the database schema under  the Data Connections in the Server Explorer. Certain versions also have the full schema and also come up with data comparison tools like Red Gate's Sql Compare

9 7 4
38,600 points

Related questions

0 votes
1 answer 57 views
Problem: I am little bit confused, which statement is true? In sql server, execute the sp_columns command to list all the columns in a table? True False
asked Feb 19 maddi86 5.4k points
0 votes
1 answer 28 views
Problems: I am new to programming, I need help, can anyone help me? What type of loop structure repeats the code a specific number of times?
asked Feb 14 maddi86 5.4k points
0 votes
1 answer 9 views
Problem: I am new to programming. I have a table with 1000+ partitions. The "Show partitions" command only lists a very small number of partitions I have found out that "show partitions" command only lists exactly the 500 partitions. And the "select ... where ..." command only processes the 500 partitions! So please guide me in showing all partitions.
asked Aug 7 Raphael Pacheco 4.9k points
0 votes
1 answer 5 views
0 votes
1 answer 20 views
Problems: Can anyone give the right solution? What term is used to describe the unused space at the end of the last cluster?
asked Feb 14 maddi86 5.4k points