[thelist] Dropping a view in SQL Server
rudy
r937 at interlog.com
Tue May 8 07:52:53 CDT 2001
> Can anyone tell me how can I check whether a view exists,
> and if it exists to drop it.
hi marios
drop view foobar
if it existed, it doesn't now
if it didn't, it still doesn't ;o)
by the way, the other answers you got are good, sometimes you do need to
query the sysobjects table, but if all you want is something gone, just
drop it
the drop statement is part of sql, and would be run in ASP exactly the same
way you run a select statement
if you need to look at an object, execute either
sp_help objectname
or
sp_helptext storedprocname
to show the source of a stored procedure
(please double-check, this was from memory, and we all know how reliable
that can be before coffee)
not sure how you would execute stored procs in ASP, but try "exec
storedprocname" where you usually place your query
rudy
More information about the thelist
mailing list