-- Check whether particular table exists in the databaseif exists (select * from sys.objects where object_id = object_id(N'[#table]'))begindrop table #tableenduse tempdbgo--Create the temp table #tablecreate table #table (IPValues varchar(200))insert into #table exec master..xp_cmdshell 'ipconfig'-- select the data from the table #tableselect * from #table where IPValues is not null-- You will get results like this
No comments:
Post a Comment