Using sysobjects
437360Jan 29 2005 — edited Jan 31 2005I am trying to write a script to do what this question asks:
Create a view showing each oil and any associated caution description(s). Name the description column "Caution". Include code that checks if the view already exists. If it does, it should be dropped and re-created.
I have been pointed to sysobjects for the portion that requires us to check to see if the view already exists. The question that I have is, do I start the script with this for the check command:
SELECT (The view I am looking for)
FROM (I am not sure what to put here)
WHERE xtype='V'
Thank you for your time and consideration.