I'm trying to create a VIEW
in my database, and it shows me
"Incorrent syntax error"
Am I doing something wrong?
I'm trying to create a VIEW
in my database, and it shows me
"Incorrent syntax error"
Am I doing something wrong?
You selected two select statements. You should run only statement starting from Create View till where clause.
create view view_name as select id from tab where id = some_id;
Just run one statement of create view that's it.
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