The following code creates a table called New_Table in the database
and loads the result of the UNION into the new table.
SELECT X.* INTO New_Table FROM
Netbios_name as Machine_Name,
Last_Login as User_Name
Table_2)) as X
I now need to drop this table if it exists ,
my question is what syntax do i need to precede this with in order to drop the table New_Table?
hi lsavidge, thanks for your additional comment
if object_id('New_Table') is not null
Drop TABLE New_Table
worked fine...thanks... have not used temp table option
hi pratima mcs...those options didn't work for me ,....thanks for the inputs