SQL (Updating data)

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

Exec sp_columns <table_name>

Command which is executed to list all the columns in the specified table

SET XACT_ABORT ON

Turns the Autocommit feature off.

SET XACT_ABORT OFF

Turns the Autocommit feature on.

COMMIT TRANSACTION

Use the COMMIT TRANSACTION command to make updates permanent

DELETE

Use the DELETE command to delete existing rows from a table

DROP TABLE

Use the DROP TABLE command to delete a table and all of its data.

What is an INSERT command containing a SELECT command used for?

Use the INSERT command containing a SELECT command to select the desired data to be included from the existing table.

INSERT

Use the INSERT command to add new rows to a table

ROLLBACK TRANSACTION

Use the ROLLBACK TRANSACTION command to reverse any updates that have not been committed.

How do you add a column to a table?

To add a column to a table, use the ALTER TABLE command with an ADD clause.

How do you change a specific value in a column to null?

To change a specific value in a column to null, use the SET clause followed by the column name, use a condition to select the row, then use an equal sign, and the word NULL.

How do you change all values in a column to null?

To change all values in a column to null, use the SET clause followed by the column name, an equal sign, and the word NULL.

How do you change the characteristics of a column?

To change the characteristics of a column, use the ALTER TABLE command with a MODIFY clause.

CREATE TABLE

To create a new table from an existing table, first create the new table by using the CREATE TABLE command.

UPDATE

Use the UPDATE command to change existing data in a table.


Kaugnay na mga set ng pag-aaral

Discussion Questions Lecture 1-8

View Set

Math Knowledge - 25 questions- 22min (52sps)

View Set

Chapter 54: Management of Patients with Kidney Disorders (Exam 2)

View Set

NWMSU Chapter 5 Employee Rewards and Benefits

View Set

Psychology 123.72: Quiz 6 (chapter 8)

View Set