• Source
    1. --create table with the specified fields
    2. create table aTable (id integer ,
    3. name char(30),
    4. surname char(30),
    5. salary numeric);
    6. --insert data to the coresponding fields
    7. insert into aTable values(1,'John','John_Surname',234.554);
    8. insert into aTable values(2,'Tim','Tim_Surname',3445.455);
    9. insert into aTable values(3,'Gary','Gary_SurnameLane',33234.33445);
    10. --select all the data from the table
    11. select * from aTable;
    12. --adds another field 'address' to the table schema
    13. alter table aTable add column address char(30);
    14. --selects all the data again
    15. select * from aTable;
    16. --update the table adding the addresses
    17. update aTable set address = 'John Address' where id=1;
    18. update aTable set address = 'Tim Address' where id=2;
    19. update aTable set address = 'Gary Address' where id=3;
    20. --selects all the data from the table
    21. select * from aTable;