• 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

Please log in or register to answer this question.

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 88 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, 2020 maddi86 5.4k points
0 votes
1 answer 10 views
0 votes
1 answer 4 views
Problem: How to select a partial of a table for exporting using SQL? How can I do that? Thanks
asked Mar 9 ummesalma 22k points
0 votes
1 answer 218 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, 2020 maddi86 5.4k points
0 votes
1 answer 3 views
Problem: Please assist me in resolving this issue: With ....... statement names can be directly used. module name is not required
asked Mar 30 tuhin1 46.8k points
0 votes
1 answer 17 views
0 votes
1 answer 37 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, 2020 maddi86 5.4k points
0 votes
1 answer 8 views
Problem: What is structure and union in C++? What is structure and union with example? What is a union in C ++? Which is better structure or union? the total memory space allocated is equal to the member with largest size. All other members share the same memory space. What is the biggest difference between structure and union?
asked Dec 23, 2020 Mashhoodch 13k points
0 votes
1 answer 43 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, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 4 views
Problem: Is it possible to inject sql to delete the statement? Help.
asked Mar 9 ummesalma 22k points