This query comes in handy when you want to check whether a column exists in a table before adding it. For example, the following PL/SQL block checks whether the members table has effective_date column before adding it.
Summary: in this tutorial, you will learn how to use the SQL ADD COLUMN clause of the ALTER TABLE statement to add one or more columns to an existing table. Overview of SQL ADD COLUMN clause. To add a new column to a table, you use the ALTER TABLE ADD COL
ADD CONSTRAINT. The ADD CONSTRAINT command is used to create a constraint after a table is already created. The following SQL adds a constraint named "PK_Person" that is a PRIMARY KEY constraint on multiple columns (ID and LastName):
Post a Comment:
Showing 0 Comments: