SQL Quiz

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

How do you change a column to an existing table in MS SQL Server? a. ALTER TABLE table_name ALTER COLUMN column_name CHAR(3); b. MODIFY TABLE table_name ALTER column_name CHAR(3); c. ALTER TABLE table_name MODIFY COLUMN column_name CHAR(3); d. MODIFY TABLE table_name MODIFY COLUMN new_column CHAR(3);

a. ALTER TABLE table_name ALTER COLUMN column_name CHAR(3);

Which clause is used to change the characteristics of an existing column in a table? a. MODIFY b. UPDATE c. SET d. ALTER

a. MODIFY

Which of the following statements defines a TRANSACTION? a. A transaction is a physical unit of work. b. A transaction is a sequence of steps that accomplish a single task. c. A transaction is a physical sequence of steps to accomplish a task d. A transaction are logical groups of work. e. All of the above f. None of the above

b. A transaction is a sequence of steps that accomplish a single task.

How do you add a column to an existing table in MySQL? a. ALTER TABLE table_name ADD COLUMN new_column CHAR(3); b. ALTER TABLE table_name ADD new_column CHAR(3); c. MODIFY TABLE table_name ADD new_column CHAR(3); d. MODIFY TABLE table_name ADD COLUMN new_column CHAR(3);

b. ALTER TABLE table_name ADD new_column CHAR(3);

How do you reverse a transaction? a. Use UNDO feature b. Use ROLLBACK c. Set AUTOCOMMIT OFF d. Set SAVE OFF e. All of the above. f. None of the above.

b. Use ROLLBACK

Which of the following SQL statements is valid? a. INSERT INTO table_name (val1, val2); b. ALTER COLUMN column_name SET PRIMARY KEY; c. INSERT INTO table_name SELECT col1, col2 FROM table_name2; d. ALTER TABLE table_name SET col1 PRIMARY KEY; e. All of the above. f. None of the above.

c. INSERT INTO table_name SELECT col1, col2 FROM table_name2;

Which of the following SQL vendors does not include AUTOCOMMIT? a. MySQL b. Oracle c. MS SQL Server d. All of the above e. None of the above

c. MS SQL Server

Which of the following is not a valid command related to transactions? a. ROLLBACK b. COMMIT c. SAVE d. All of the above e. None of the above

c. SAVE

Which of the following statements is valid? a. DROP table_name; b. DELETE TABLE table_name; c. UPDATE TABLE table_name SET col1 = new_value; d. ALTER TABLE table_name MODIFY col1 CHAR(10); e. All of the above. f. None of the above.

d. ALTER TABLE table_name MODIFY col1 CHAR(10);

Which of the following is not a valid INSERT statement? a. INSERT INTO table_name VALUES (val1, val2); b. INSERT INTO table_name (column1, column2) VALUES (val1, val2); c. INSERT INTO table_name1 SELECT col1, col2 FROM table_name2; d. INSERT INTO table_name1 VALUES (SELECT col1, col2 FROM table_name2); e. All of the above f. None of the above

d. INSERT INTO table_name1 VALUES (SELECT col1, col2 FROM table_name2);


Kaugnay na mga set ng pag-aaral

Chapter 4- The Carbohydrates: Sugar, Starch, and Fiber.

View Set

Organizational Behavior Individual Exam

View Set

Life Guarantee exam missed questions

View Set

Phil 130 Exam 3: Problems with Utilitarianism, Kantian Deontology, Virtue Ethics

View Set

Psy 101 - Chapter 12 Social Psychology

View Set

Renal Quizzing Questions Chapters 29-30

View Set

The Face on the Milk Carton Review (12pts)

View Set

ACAPENTA Science Section 3 The Space Race

View Set

Fat soluble vitamins: A, D, E, and K

View Set