daily pastebin goal
68%
SHARE
TWEET

Untitled

SQLSoldier Jan 24th, 2014 149 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Create Table dbo.TestTable (TestID int, TestValue varchar(5))
  2. Go
  3.  
  4. Create Function dbo.TestTVF ()
  5. Returns Table
  6. As
  7. Return (Select * From dbo.TestTable)
  8. Go
  9.  
  10. Select *
  11. From dbo.TestTVF();
  12. Go
  13.  
  14. Alter Table dbo.TestTable Add TestValue2 varchar(5);
  15. Go
  16.  
  17. Exec sp_refreshsqlmodule 'dbo.TestTVF';
  18. go
  19.  
  20. Select *
  21. From dbo.TestTVF();
  22. Go
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