We can use the ‘ALTER TABLE’ statement in oracle to add columns to a table using ADD keyword.
CREATE INDEX statement is used to create Indexes using table columns.An index allows faster retrieval of records.It is mainly used as a performance-tuning method.An index creates an entry for each value that appears in the indexed columns.
CREATE TABLE AS SELECT statement can be used when we need to extract part or full data from a table and store it into another table based on certain conditions .
Usage Create table statement with foreign key constraint will create table with referential integrity.
Foreign Key holds the reference to another table column value.
‘CREATE TABLE’ : sql create table command with composite primary key.CREATE TABLE statement can be used to create table objects in database. It is possible to add constraints like primary key ,foreign key while table creation.Primary key is the unique identifier for a row of data.
CREATE TABLE statement is used to create table objects in database.You can create tables with different column data types.It is possible to add CONSTRAINTS like primary key ,foreign key etc while creating the table or can be added after the table creation.
Oracle Tables: CREATE TABLE statement: create a table with primary key.
Oracle Tables: Foreign Keys with ON DELETE CASCADE option.Foreign Keys with ON DELETE CASCADE option allows us to create parent child tables which automatically deletes referenced data in child tables when deleted from parent table.
Oracle: ORA-02449: unique/primary keys in table referenced by foreign keys
‘ORA-02292: integrity constraint violated – child record found’ error occurs when we try to delete a row from a parent table which is having a child table with foreign key constraint and the corresponding data exists in the child table.