Reputation: 1
I have recently installed db2 in my system and created the sample database which has 47 tables. I tried to retrieve data from the tables using clp plus.
used connect db2admin@localhost:50000/sample and gave password. it gave back database connection information.
when i use select * from employee (employee is a table in sample) iam getting 2.
what is this 2 how to check data present in the tables.
Upvotes: 0
Views: 198
Reputation: 12287
The reason that you get 2
is that you did not terminate the query with a semi-colon, so clpplus thinks that you want to enter line-2 (the second line) of the query and it displays that line number and waits for you to enter more text.
When you want to indicate that the statement is complete, enter a statement terminator character.
The default statement terminator is a semi-colon (;
) so inside clpplus you should use:
select * from employee ;
Upvotes: 1