RSS Feed

Multiple Choice Questions - SQL Server - Table Columns

Multiple Choice Questions - SQL Server - Table Columns

1. In order to obtain all the column names of any given table you can use:

A) Base Table
B) TABLE_CONSTRAINTS
C) Information Schema Views
D) Exec sp_columns [tablename]

2. ALTER TABLE statement always adds the columns to the beginning of the table.

A) True
B) False

3. Which of the below statement is correct if you are converting a column from varchar(50) to nvarchar(150).

A)
Alter Table TableName 
Alter Column ColumnName varchar(50) to nvarchar(150) [null | not null]
B)
Alter Table TableName 
Alter Column ColumnName nvarchar(150) [null | not null]
C)
Alter Column ColumnName nvarchar(150) [null | not null]
D)
Alter Table TableName 
Alter Column ColumnName nvarchar(159) [null | not null]

4. New columns in SQL Server default to null.

A) True
B) False

5. You cannot modify an existing table column to add the IDENTITY property.

A) True
B) False

6. ALTER TABLE statement will fail if adding the column will cause the data row size to exceed ........ bytes.

A) 1024
B) 2048
C) 8060
D) 65536

7. Which of the following is not a data type in SQL Server.

A) asmallmoney
B) uniqueidentifier
C) table
D) image

8. Column_Name can be up to ........ characters.

A) 64
B) 128
C) 256
D) 1024

9. Dropping a column also reclaims the disk space of the column.

A) True
B) False

10. A column with a ......... data type cannot be altered.

A) image
B) ntext
C) text
D) timestamp
E) all of above

Answers