About 28,000 results
Open links in new tab
  1. How can I show the table structure in SQL Server query?

    Aug 18, 2013 · In SQL Server, you can use this query: USE Database_name SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='Table_Name'; And do not forget to replace Database_name and Table_name with …

  2. sql - Describe table structure - Stack Overflow

    Jun 7, 2017 · For SQL Server use exec sp_help. For MySQL, use describe. For Sybase aka SQL Anywhere the following command outputs the structure of a table: Highlight table name in the console and press ALT+F1. OP asked for the query not for a vague steps in a unspecified console. For SQL, use the Keyword 'sp_help' This depends on your database vendor.

  3. View the Table Definition - SQL Server | Microsoft Learn

    Feb 4, 2025 · You can display properties for a table in SQL Server by using SQL Server Management Studio or Transact-SQL. You can only see properties in a table if you either own the table or have been granted permissions to that table. In Object Explorer, select the table for which you want to show properties.

  4. get basic SQL Server table structure information

    Feb 11, 2013 · sp_help will give you a whole bunch of information about a table including the columns, keys and constraints. For example, running. will give you information about Address. Name and datatype: sc.name AS [Columne Name], . st1.name AS [User Type], st2.name AS [Base Type] INNER JOIN dbo.systypes st1 ON st1.xusertype = sc.xusertype.

  5. How to view table structure in SQL? - TablePlus

    Sep 11, 2019 · To show the table structure with all its column’s attributes: name, datatype, primary key, default value, etc. In SQL Server, use sp_help function: In MySQL and Oracle, you can use DESCRIBE: Or. In PostgreSQL, here is the go-to statement: INFORMATION_SCHEMA.COLUMNS. TABLE_NAME = table_name; In SQLite, it’s …

  6. SQL | DESCRIBE Statement - GeeksforGeeks

    May 10, 2023 · Step 1: Defining the structure of the table. Creating a table: id int not null, name char(25), city varchar2(25) Step 2: Displaying the structure of the table: Table: OR. Output: Note: Here above ID column is of not null type and rest 2 columns can contain null values.

  7. SQL Server Describe Table - GeeksforGeeks

    May 27, 2024 · Describing a table means getting information about the structure and metadata of the table. In this article, we will learn how to describe a table in SQL Server. How to Describe a Table in SQL Server. There are 3 methods through which we can describe a table in SQL Server: Using sp_help; Using sp_columns; Using INFORMATION_SCHEMA Views

  8. SQL Server – Get the Table Structure Using T-SQL

    When you are writing a SELECT statement and you just want to limit the number of columns, you would use the sp_help stored procedure to research the underlying table structure as shown below.

  9. SQL Server Describe Table - Tpoint Tech - Java

    Mar 17, 2025 · We can display the table structure or properties for a table only when we have either owned the table or granted permissions to that table. The following are the ways to display properties or structure of a table in SQL Server: Transact-SQL; SQL Server Management Studio; Using Transact-SQL

  10. Get the Table Structure using a simple query - SQLServerCentral

    Aug 5, 2002 · Using this query you can have the complete table structure for all the user tables with Table Name, Column Name, Data Type, and Null attributes of a column.

  11. Some results have been removed
Refresh