SQL server schema and default schema

前端 未结 3 1295
刺人心
刺人心 2020-11-30 10:53

I have a schema define in my database. Except now everytime I do a sql statement I have to provide the schema ... SELECT * FROM [myschema].table

I set

3条回答
  •  借酒劲吻你
    2020-11-30 11:23

    Is the user an SA, if so it will not work, according to the documentation SA users are always defaulted to the dbo schema.

    The value of DEFAULT_SCHEMA is ignored if the user is a member of the sysadmin fixed server role. All members of the sysadmin fixed server role have a default schema of dbo.

提交回复
热议问题