Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SQL Workbench/J console interface started.
- Enter 'exit' to quit.
- Enter 'WbHelp' for a list of SQL Workbench/J specific commands
- SQL> wbconnect h2;
- Connection to "User=sa, Catalog=H2TEST, URL=jdbc:h2:c:/Daten/db/h2/h2test" successful
- Execution time: 1.55s
- SA@H2TEST/PUBLIC> create table foo (id integer, some_time timestamp);
- Table 'foo' created
- Execution time: 0.02s
- SA@H2TEST/PUBLIC> insert into foo (id) values (1);
- INSERT executed successfully
- 1 row(s) affected.
- Execution time: 0s
- SA@H2TEST/PUBLIC> ALTER TABLE FOO ALTER COLUMN some_time SET DEFAULT current_timestamp;
- ALTER executed successfully
- Execution time: 0s
- SA@H2TEST/PUBLIC> insert into foo (id) values (2);
- INSERT executed successfully
- 1 row(s) affected.
- Execution time: 0s
- SA@H2TEST/PUBLIC> select * from foo;
- ID | SOME_TIME
- ---+------------------------
- 1 | (null)
- 2 | 2013-01-08 21:49:33
- (2 Rows)
- SELECT executed successfully
- Execution time: 0.09s
- SA@H2TEST/PUBLIC>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement