SHARE
TWEET

Untitled

a guest Jun 25th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. drop procedure if exists SomeProc;
  2. go
  3.  
  4. create or alter procedure SomeProc
  5. as begin
  6.     select
  7.         a = CONVERT(bit, 1),
  8.         b = CONVERT(int, 2)
  9. end
  10. go
  11.  
  12. drop table if exists SomeTable;
  13. go
  14.  
  15. select *
  16. into SomeTable
  17. from openrowset
  18. (
  19.     'SQLNCLI',
  20.     'Server=localhost;Trusted_Connection=yes;',
  21.     'EXEC SomeProc'
  22. );
  23. go
  24.  
  25. select * from SomeTable;
  26. go
  27.  
  28. select
  29.     *
  30. from sys.all_columns
  31. where object_id = OBJECT_ID('SomeTable');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top