0

I do not have the ability to create tables currently; however, I can create temp tables.

I am trying to materialize a view and then look at the DDL of the materialized view.

If I take the results of a view and insert all of the records into a #temp table, is there a way I can view that table's DDL?

Example of what I am trying to do:

select col_1, col_2, ..., col_10
into #temp_table

How can I view the DDL for the temp table?

Edit #1:

This is what I tried doing:

select
    'test' as [test]
into
    #myTemptable;
go

select *
from
    [INFORMATION_SCHEMA].[Columns]
where
    table_name like '#myTempTable%';
go

0 Answers0