Guest User

Untitled

a guest
Nov 18th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. CREATE TABLE tmp(
  2. guid text default (hex(randomblob(16))) primary key,
  3. note text
  4. );
  5.  
  6. Insert into tmp(note) VALUES
  7. ('val1'),
  8. ('val2'),
  9. ('val3'),
  10. ('val4'),
  11. ('val5'),
  12. ('val6'),
  13. ('val7');
  14.  
  15. select * from tmp;
  16.  
  17. -- Select last GUID:
  18.  
  19. select * from tmp LIMIT (select count(*) from tmp)-1, 1;
Add Comment
Please, Sign In to add comment