SQL Server Database Administrator Question:
Explain what is a Schema in SQL Server 2005? Explain how to create a new Schema in a Database?

Answer:
A schema is used to create database objects. It can be created using CREATE SCHEMA statement. The objects created can be moved between schemas. Multiple database users can share a single default schema.
CREATE SCHEMA sample;
Table creation
Create table sample.sampleinfo
{
id int primary key,
name varchar(20)
}
CREATE SCHEMA sample;
Table creation
Create table sample.sampleinfo
{
id int primary key,
name varchar(20)
}
Previous Question | Next Question |
As a part of your job, what are the DBCC commands that you commonly use for database maintenance? | What are database files and filegroups? |