Created
September 17, 2012 06:47
-
-
Save sinairv/3735883 to your computer and use it in GitHub Desktop.
Template for creating and testing SQL views
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Template for creating and testing SQL views | |
IF EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'vSomeView') | |
DROP VIEW [dbo].[vSomeView] | |
GO | |
CREATE VIEW [dbo].[vSomeView] AS | |
SELECT * FROM SomeTable | |
GO | |
SELECT * FROM [dbo].[vSomeView] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment