Advertisement
sergAccount

Untitled

Feb 13th, 2021
3,607
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.54 KB | None | 0 0
  1. -- accounts
  2. CREATE TABLE accounts (
  3.     user_id serial PRIMARY KEY,
  4.     username VARCHAR ( 50 ) UNIQUE NOT NULL,
  5.     password VARCHAR ( 50 ) NOT NULL,
  6.     email VARCHAR ( 255 ) UNIQUE NOT NULL,
  7.     created_on TIMESTAMP NOT NULL,
  8.         last_login TIMESTAMP
  9. );
  10.  
  11.  
  12. INSERT INTO accounts
  13. (username, "password", email, created_on, last_login)
  14. VALUES('test1', 'test1', 'test@test.com', now(), NULL);
  15.  
  16. INSERT INTO accounts
  17. (username, "password", email, created_on, last_login)
  18. VALUES('test2', 'test1', 'test@test.com', now(), NULL);
  19.  
  20. SELECT * FROM accounts
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement