create a view with schema binding

  • Hello everybody,                                              I want to create a view with the option 'schema binding'.What is the problem in my statement

    create view checks with schemabinding as select sno from test,

    I receive an error msg as,

    Cannot schema bind view 'checks' because name 'test' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself.

  • You need to qualify the object with it's owner name.

    create view dbo.checks with schemabinding as select sno from dbo.test

    Should do it

  • Thanq mike, now only i saw ur reply n thans once again

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply