Advertisement
miklis

attacking dbvs

May 24th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. --PostgreSQL 9.6
  2. --'\\' is a delimiter
  3.  
  4. select version() as postgresql_version;
  5.  
  6. DROP TABLE EGZAMINAS;
  7. BEGIN TRANSACTION;
  8.  
  9. /* Create a table called NAMES */
  10. CREATE TABLE EGZAMINAS(Dalyvis integer PRIMARY KEY, Vardas text, "PavardÄ—" character(15), Taskai float, data DATE);
  11.  
  12. /* Create few records in this table */
  13. INSERT INTO EGZAMINAS VALUES(1,'Tom','Andrec',0.12,'2018-04-15');
  14. INSERT INTO EGZAMINAS VALUES(2,'Lucy','Bellyj',0.98,'2018-04-15');
  15. INSERT INTO EGZAMINAS VALUES(3,'Frank','Stopovic',0.17,'2018-04-15');
  16. INSERT INTO EGZAMINAS VALUES(4,'Jane','Spjecek',0.45,'2018-04-15');
  17. INSERT INTO EGZAMINAS VALUES(5,'Robert','Bagu',0.34,'2018-04-15');
  18. COMMIT;
  19.  
  20. /* Display all the records from the table */
  21. SELECT EXTRACT(YEAR FROM data) AS ct FROM EGZAMINAS;
  22. DROP TABLE EGZAMINAS;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement