select count(*) from tab;

解决方案 »

  1.   

    首先谢谢你,坦克!!
    但是我在pb中输入select count(*) into 变量名 from tab语句时,
    系统说是有:syntax error。
    请问还有什么地方有问题?
    谢谢!!
      

  2.   

    select count(*) into :i from tab where tabtype='TABLE';
    必须是system或sys用户登陆。
      

  3.   

    我是这样实现前后台的联系的:
    pb是8.1,oracle是8.1.7
    在pb中用专用接口和oracle联系的,用户名是system,密码是manager,表所有者是manager。
    在pb中用select count(*) into :i from tab where tabtype='TABLE'语句,就是说有语法错误。
    请问在什么地方有错误?
    谢谢!!
      

  4.   

    我是这样实现前后台的联系的:
    pb是8.1,oracle是8.1.7
    在pb中用专用接口和oracle联系的,用户名是system,密码是manager,表所有者是system,不好意思上面写错了。
    在pb中用select count(*) into :i from tab where tabtype='TABLE'语句,就是说有语法错误。
    请问在什么地方有错误?
    谢谢!!
      

  5.   

    select count(*) into :i from tab where tabtype='TABLE'
    不用system/manager,一般用户就可以了,你可以先在SQLplus里看看SQL对不对啊
    select count(*) from tab where tabtype='TABLE'
    或 select count(*) v_count into :i from tab where tabtype='TABLE'
      

  6.   

    我在SQLplus里运行select count(*) into :i from tab where tabtype='TABLE'是可以得到表的数目的。