February 18, 2012 at 12:28 pm
When a schema and object appear like this "production.product", can I get an example when the schema is not a database AND the object is not a table?
I'm curious about this.
February 18, 2012 at 12:30 pm
Schema is never a database. Schema is, well, a schema a logical grouping of objects within a database. The object can be anything, table, view, procedure, function, etc, they're all referenced the same way.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 19, 2012 at 9:37 pm
Hi,
Yes 'Gila' is right,in other words you can also think that schema is a container of objects such as tables,views,stored procedures and others...by using the schema we can control the permissions at different objects (tables).
February 20, 2012 at 5:02 pm
I think of Schemas as SQL Server's version of namespaces.
February 20, 2012 at 10:10 pm
it is good practice when we refer to objects in our code we always use the two-part object names
otherwise SQl will apply to resolve the schema name.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply