SQL Server 2005/2008 - Why is the sys.sysobjects view available to users without the schema name?

前端 未结 2 1501
清歌不尽
清歌不尽 2021-01-15 04:23

I\'ve noticed some strange behavior in SQL Server Express 2008, and I\'ve been trying to track down the cause. When you create a new database, you are able to access the sys

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-15 04:37

    IIRC, SQL Server looks for objects in the following order:

    1. sys schema
    2. users schema (This is different for Stored Procs - it will look in the stroed procs schema rather than the users schema.
    3. dbo schema

提交回复
热议问题