About 4,270,000 results
Open links in new tab
  1. sql - How to view query that was used to create a table ... - Stack ...

    Apr 4, 2015 · There are two ways within SSMS to view the SQL statement (known as Data Definition Language, or DDL) used to create a table. Right-click the table and choose "Script Table as", "CREATE To" and choose your destination.

    Missing:

    • App

    Must include:

  2. HOW TO RETRIEVE THE STATEMENT USED TO CREATE THE TABLE - SQLServerCentral

    Feb 18, 2010 · all you can do is generate a statement which would create the table; it probably would not be exactly the same as how you entered it, but it will create the exact same table.

    Missing:

    • App

    Must include:

  3. view created table in microsoft sql server - Stack Overflow

    Jul 11, 2018 · I am running part of a query in Microsoft SQL server management studio. Select Table1.Column1 into #Table2 from Table1 now it has created the table but I actually want to view this table with my eyes but I cannot seem to find where the table is …

    Missing:

    • App

    Must include:

  4. sql - How to get the "CREATE TABLE" query? - Stack Overflow

    Aug 10, 2012 · You can construct the create table statement from INFORMATION_SCHEMA.Columns. Something like: select (column_name + ' ' + data_type + (case when character_maximum_length is not null then '('+character_maximum_length+')' else '' end) + ',' ) as ColumnDef from Information_Schema.columns order by ordinal_position

    Missing:

    • App

    Must include:

  5. How to retrieve the query I used to create a view?

    Apr 10, 2017 · For the purposes of recreating the query used to create your view and for the purposes of backing up all views, I found the following: Dump all views: select CONCAT('CREATE or REPLACE VIEW ',table_name,' AS ',view_definition,';') from information_schema.views; Dump views from only a specific DB:

    Missing:

    • App

    Must include:

  6. How can I get the CREATE TABLE statement in SQL Server?

    There are several ways to retrieve the CREATE TABLE statement for an existing table in SQL Server. Here are the most common methods: 1. Using SQL Server Management Studio (SSMS): - Steps: - Connect to your SQL Server instance using SSMS. - Navigate to the database containing the table. - Expand the "Tables" folder.

    Missing:

    • App

    Must include:

  7. How to View a Table in SQL: Essential Steps for Database …

    Jun 28, 2023 · MySQL and MariaDB users can use the SHOW TABLES command. PostgreSQL has the \dt command in the psql command line. SQL Server users can leverage the sys.tables feature or query from the INFORMATION_SCHEMA.TABLES table. For SQLite, the sqlite_master table can be queried. Here’s a quick rundown of how these methods work for each DBMS:

    Missing:

    • App

    Must include:

  8. How to Check Who Created the Table in SQL Server

    Apr 3, 2025 · In this article, learn how in SQL Server to check who created a table or other objects. To capture this data, we can use the default SQL Server trace. SQL Server collects data about object creation as part of the default trace including a variety of other information about your SQL Server instance.

    Missing:

    • App

    Must include:

  9. Query to get User that created table? : r/SQLServer - Reddit

    Oct 26, 2020 · Short answer - no, "created by" is not materialized anywhere from a CREATE TABLE statement. Your only option is to track it via some other external auditing method, as some of the other comments have mentioned.

  10. audit - Who created that table in SQL Server? - Database …

    Apr 13, 2019 · I was wondering if there was a way to see who created a table in SQL Server 2017.

    Missing:

    • App

    Must include:

  11. Some results have been removed
Refresh