MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
You can add a column in existing table using SQL in a database with which of the following?
A
INSERT
B
COLUMN
C
ALTER
D
TABLE
E
ADD
Explanation: 

Detailed explanation-1: -The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.

Detailed explanation-2: -The basic syntax of an ALTER TABLE command to add a New Column in an existing table is as follows. ALTER TABLE table name ADD column name datatype; The basic syntax of an ALTER TABLE command to DROP COLUMN in an existing table is as follows.

Detailed explanation-3: -If you know SQL then you probably know that you can add columns to an existing table in SQL Server using the ALTER command. It not only allows you to add a column but to drop columns as well. You can also add or drop constraints using the ALTER command.

Detailed explanation-4: -Click the tab for the table with the columns you want to copy and select those columns. From the Edit menu, click Copy. Click the tab for the table into which you want to copy the columns. Select the column you want to follow the inserted columns and, from the Edit menu, click Paste.

There is 1 question to complete.