Advertisement
Guest User

Untitled

a guest
Jan 8th, 2013
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. SQL Workbench/J console interface started.
  2. Enter 'exit' to quit.
  3. Enter 'WbHelp' for a list of SQL Workbench/J specific commands
  4.  
  5. SQL> wbconnect h2;
  6. Connection to "User=sa, Catalog=H2TEST, URL=jdbc:h2:c:/Daten/db/h2/h2test" successful
  7. Execution time: 1.55s
  8. SA@H2TEST/PUBLIC> create table foo (id integer, some_time timestamp);
  9. Table 'foo' created
  10. Execution time: 0.02s
  11.  
  12. SA@H2TEST/PUBLIC> insert into foo (id) values (1);
  13. INSERT executed successfully
  14. 1 row(s) affected.
  15. Execution time: 0s
  16.  
  17. SA@H2TEST/PUBLIC> ALTER TABLE FOO ALTER COLUMN some_time SET DEFAULT current_timestamp;
  18. ALTER executed successfully
  19. Execution time: 0s
  20.  
  21. SA@H2TEST/PUBLIC> insert into foo (id) values (2);
  22. INSERT executed successfully
  23. 1 row(s) affected.
  24. Execution time: 0s
  25.  
  26. SA@H2TEST/PUBLIC> select * from foo;
  27. ID | SOME_TIME
  28. ---+------------------------
  29. 1 | (null)
  30. 2 | 2013-01-08 21:49:33
  31.  
  32. (2 Rows)
  33. SELECT executed successfully
  34. Execution time: 0.09s
  35. SA@H2TEST/PUBLIC>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement