What is the Oracle's CREATE OR REPLACE VIEW equivalent for SQL Server?

0 votes
106 views
asked May 23 by Hitesh Garg (167 points)  

In Oracle, a view can be recreated using a single statement i.e. CREATE OR REPLACE VIEW , for ex:

CREATE OR REPLACE VIEW MY_VIEW AS
SELECT SOME_FIELD
FROM SOME_TABLE
WHERE SOME_CONDITIONS

As per this syntax, it either creates or replaces the existing view with the mention fields, tables, and conditions.

What is the equivalent in SQL Server that can do the same thing i.e. checking of existing view and DROP it before executing the create command?

Please log in or register to answer this question.

36 questions

24 answers

3 comments

18 users

Welcome to Codingeek Q&A, where you can ask questions and receive answers from other members of the community.
...