Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  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');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement