MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

DATABASE & SQL/PLSQL

DDL (Data Definition Language)
Previous Home Next

Data Definition Language (DDL) statements are used to define the database structure or schema. DDL statements are used to build and modify the structure of your tables and other objects in the database. When you execute a DDL statement, it takes effect immediately.

  1. CREATE: To create objects in the database
  2. CREATE TABLE < table_name> ( <attribute_name 1> <data_type 1>,
    <attribute_name n> <data_type n>);
    
  3. ALTER: Alters the structure of the database
  4. ALTER TABLE <table_name>ADD CONSTRAINT <constraint_name>
    PRIMARY KEY (<attribute_list>);
    

     

    The foreign key constraint is a bit more complicated, since we have to specify both the Foreign Key attributes in this (child) table, and the Primary Key attributes that they link to in the parent table.

    ALTER TABLE <table_name>ADD CONSTRAINT <constraint_name>
    FOREIGN KEY (<attribute_list>)REFERENCES <parent_table_name> 
    (<attribute_list>);
    
  5. DROP: Delete objects from the database
  6. DROP TABLE <table_name>ALTER TABLE <table_name>
    DROP CONSTRAINT <constraint name>;
    
  7. TRUNCATE: Remove all records from a table, including all spaces allocated for the records are removed
  8. COMMENT: Comments added to the data dictionary.
  9. RENAME: Rename an object of the Database.
Previous Home Next