Schema is very important. You have to create a schema for each data. Sometimes, if you do not specify a schema, the database defaults to the schema name of the currently logged-on user. Why is schema created,
You may think of it as a namespace or architecture. create schema provides methods for creating tables, views, and granting object permissions in SQL statements,
Some people are afraid of the same index name. Therefore, creating a schema is different from the index of another table. At the same time, the index, table, and view are not in the same namespace, this prevents unauthorized users from performing operations.
Why do we need to separate the namespaces? The main benefit is that the query speed of the table is improved. If the index is in the same namespace as the table, the tablespace in the database becomes smaller, because the index occupies space.
This will affect the Table query speed.
Drop schema abpgo/* ====================================== =========================================* // * User: abp * // * = =========================*/create schema abpgoif exists (select 1 from sysobjects where id = object_id ('abc. test') and type = 'U') drop table abp. testGO/* = =========================================* // * Table: test Table * // * ========================================== =========================================== */create table abp. test (aa varchar (50) not null, bb varchar (100) collate Chinese_PRC_CI_AS null, cc int null) on "PRIMARY" GO -- dbo by default, therefore, the system will prompt that the TABLE has no permission -- drop table testDROP TABLE abp. test