How do I create a view only if it doesn't exist. If it does exist, I want to drop the view and redefine it. I also want no warnings or errors.
Asked
Active
Viewed 7,264 times
2 Answers
21

T.J. Crowder
- 1,031,962
- 187
- 1,923
- 1,875
-
2darn, you beat me to it and i didn't get a notification an answer was posted already. so +1 from me. – Roland Bouman Feb 11 '10 at 16:27
2
CREATE OR REPLACE VIEW <view name>
AS
<your select expression goes here>

Roland Bouman
- 31,125
- 6
- 66
- 67