nderstanding database basics in SQL Server is essential for managing data effectively. These 30 MCQs cover key concepts such as creating databases, table structures, keys, and database schemas.
CREATE DATABASE statement is executed without specifying file size?
CREATE DATABASE syntax?
C:\ProgramData\SQLServerC:\Program Files\Microsoft SQL Server\MSSQL\DataD:\SQLDataAUTOGROW option in a CREATE DATABASE statement determine?
FirstName NVARCHAR(50)Price MONEY NOT NULLDateOfBirth DATE DEFAULT GETDATE()Address VARCHARVARCHAR(MAX) column?
IDENTITY property on a column signify?
dboALTER SCHEMA command do?
dbo schema by default| Qno | Answer (Option with text) |
|---|---|
| 1 | b) CREATE DATABASE |
| 2 | b) Default file sizes are used |
| 3 | a) The database name |
| 4 | b) C:\Program Files\Microsoft SQL Server\MSSQL\Data |
| 5 | b) How the database files expand when full |
| 6 | b) CREATE TABLE |
| 7 | c) MONEY |
| 8 | c) DateOfBirth DATE DEFAULT GETDATE() |
| 9 | b) 2 GB |
| 10 | b) The column value will auto-increment |
| 11 | b) To ensure unique identification of each row |
| 12 | c) PRIMARY KEY |
| 13 | b) The operation is rolled back |
| 14 | b) The foreign key column must reference a primary or unique key |
| 15 | b) A composite primary key ensures uniqueness across all columns |
| 16 | c) DBO |
| 17 | a) ALTER SCHEMA |
| 18 | b) Schemas group database objects logically |
| 19 | c) Faster query execution |
| 20 | c) The operation is not allowed |
| 21 | a) SELECT * FROM SYS.SCHEMAS |
| 22 | c) Moves database objects between schemas |
| 23 | d) Both a and b |
| 24 | a) It is placed in the dbo schema by default |
| 25 | d) Schemas enforce referential integrity |