SQL Server Schema Related Interview Questions, Is without prefix with schema will work or not, in simple select statement?

SQL Server Interview Question: Suppose you have created a schema "Sales" and you have a table under it as Sales.Customer, then let me know if you execute a select statement without prefix table with schema name then it will work or not?
Means, SELECT * FROM Customer will work or not?
Ans: no it will throw error, if you have created schema then you need to prefix table with it, otherwise it will look into default schema (dbo) and through error.
Click here for more than 300 Sql server Interview questions



Contact Form