Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近在我的系统中安装了 db2 并创建了包含 47 个表的示例数据库。我尝试使用 clp plus 从表中检索数据。
使用connect db2admin@localhost:50000/sample并提供密码。它返回数据库连接信息。
当我使用 select * from employee (员工是示例中的一个表)时,我得到 2。
这是什么 2 如何检查表中存在的数据。
您得到的原因2是您没有用分号终止查询,因此 clpplus 认为您要输入查询的第 2 行(第二行)并显示该行号并等待您输入更多文字。
2
如果要指示语句已完成,请输入语句终止符。
默认语句终止符是分号 ( ;),因此在 clpplus 中您应该使用:
;
select * from employee ;