Column

From Oracle FAQ
Jump to: navigation, search

A column is one of the two components of a relational table (the other is called a row). Every table in a relational database has one or more columns. A column is named and contains related information. In non-relational terminology, a column can be thought of as a field.

Contents

[edit] Add column to table

One can add columns to a table, example:

ALTER TABLE t1 ADD (c2 NUMBER);

[edit] Remove column from table

One can remove columns from a table, example:

ALTER TABLE t1 DROP COLUMN c2;

[edit] Change column values

Example, changing a the salary column:

UPDATE emp SET sal=sal*1.1 WHERE empno = 123;

[edit] Adding column values

Example, inserting a value into column c1:

INSERT INTO t1 (c1) VALUES (123);
Glossary of Terms
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #