• Source
    1. --create table with the specified fields
    2. create table aTable (id integer ,
    3. name char(30),
    4. surname char(30),
    5. address char(30),
    6. salary numeric);
    7. --insert data to the coresponding fields
    8. insert into aTable values(1,'John','John_Surname','J_Address',234.554);
    9. insert into aTable values(2,'Tim','Tim_Surname','T_Address',3445.455);
    10. insert into aTable values(3,'Gary','Gary_Surname','G_Address',33234.33445);
    11. insert into aTable values(4,'Mary','Mary_Surname','M_Address',234.45);
    12. --select all the data from the table
    13. select * from aTable;
    14. --selects all records with salary > 5000
    15. select * from aTable where salary > 5000;
    16. --selects name and surname of the employee who gains more than 5000
    17. select name, surname from aTable where salary > 5000;
    18. --select all records in which surname begins with G
    19. select * from aTable where surname like 'G%';
    20. --select all records in which surname begins with T
    21. select * from aTable where address like 'T%';
    22.