Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
marjune
Starting Member
2 Posts |
Posted - 2010-05-28 : 04:30:53
|
| hi, i'm newbie with creating view and i don't know the right syntax for dropping the view if exist then create again!!! |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-05-28 : 04:33:23
|
USE AdventureWorks ;GOIF OBJECT_ID ('hiredate_view', 'V') IS NOT NULLDROP VIEW hiredate_view ;GOCREATE VIEW hiredate_viewAS SELECT c.FirstName, c.LastName, e.EmployeeID, e.HireDateFROM HumanResources.Employee e JOIN Person.Contact c on e.ContactID = c.ContactID ;GOhttp://msdn.microsoft.com/de-de/library/ms187956(SQL.90).aspx No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
jeffw8713
Aged Yak Warrior
819 Posts |
Posted - 2010-05-28 : 18:19:09
|
| Or, you can alter the view instead of dropping it. |
 |
|
|
|
|
|