You are modifying a table named Product in a SQL Server 2005 database. You want to add a new column named FriendlyName to the Product table. A friendly name for each product will be stored in this column. The table currently contains data. Thesales department has not yet created a friendly name for each product. FriendlyName is a required value for each product. You want to add this new column by using the least amount of effort. What should you do?()
A: Define the new column as NUL
B: Update the FriendlyName column to the same valueas the productName column. Alter the FriendlyName column to be NOT NUL
C:
D: Define the new column as NOT NULL with a default value of ’Undefined.’
E: Define the new column as NUL
F: Use application logic to enforce the data constraint.
G: Define the new column as NULL with a default value of ’Undefined.’
A: Define the new column as NUL
B: Update the FriendlyName column to the same valueas the productName column. Alter the FriendlyName column to be NOT NUL
C:
D: Define the new column as NOT NULL with a default value of ’Undefined.’
E: Define the new column as NUL
F: Use application logic to enforce the data constraint.
G: Define the new column as NULL with a default value of ’Undefined.’
举一反三
- 14 In triple sequence table of sparse matrix, each triple represents ( ). A: the row number,column number and data value of non-zero elements in the matrix B: the data value of non-zero elements in the matrix C: the row and column numbers of elements in the matrix D: the row number,column number and data value of elements in the matrix
- 以下语句错误的是( ) A: alter table emp delete column addcolumn; B: alter table emp modify column addcolumn char(10); C: alter table emp change addcolumn addcolumn int; D: alter table emp add column addcolumn int;
- SQL中向基本表增加字段的语句为 A: INSERT INTO B: UPDATE COLUMN C: AIJTER TABLE ADD D: MODIFY COLUMN ADD
- In a spreadsheet, a cell is defined as the A: intersection of a table and a row B: intersection of a table and a column C: intersection of a row and column D: intersection of a column and a record
- 为表Reader删除邮件地址email( )。 A: DROP COLUMN E-mail B: use table Reader DROP COLUMN E-mail C: ALTER TABLE Reader DROP COLUMN E-mail D: 其余选项全错