The dbo. prefix in database object names, can I ignore it?

前端 未结 6 960
无人及你
无人及你 2021-02-19 07:15

I am looking for a performant default policy for dealing with the .dbo prefix.

I realize that the dbo. prefix is more than syntactic noise, however I got through the pa

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-19 07:49

    Yes you can ignore - for the most part - if you never ever create anything outside the (default) "dbo" schema. One place you can't ignore it is when calling a stored function - that always has to have the "two-part" notation:

    select * from dbo.myFunc
    

    However, it is considered a best practise to always use the "dbo." prefix (or other schema prefixes, if your database has several schemas).

    Marc

提交回复
热议问题