Skip to content
Advertisement

Creating a VIEW in SQL-Server

I’m trying to create a VIEW in my database, and it shows me

“Incorrent syntax error”

Am I doing something wrong?

Advertisement

Answer

Include GO between your Create View and Select query (or) view should be the only statement.

CREATE  VIEW  [dbo].[View_name]  As

-- view logic

GO


Select * from table
Advertisement