I’m using MS SQL 2005 and when I create a function I need to put the schema name to call it:
select dbo.MyFunc
All my tables are also in ‘dbo’ schema and I don’t need the schema name to reference it, so I’d like to know if I’m missing some configuration that could do the same to functions.
Short answer, no it isn’t.
You should consider to prefix all your database objects with the schema owner to avoid having sql server to ‘look it up’.
It makes your statements more readable and gives a slight increase in performance (although you’d probably won’t notice it).
Regards, Lieven