在oracle中选择一个变量计数

时间:2011-08-18 13:36:07

标签: database oracle stored-procedures count

嗨,我今天一直在尝试,没有运气。此存储过程不起作用:(

CREATE OR REPLACE PROCEDURE LEAD_PURGE(closed IN DATE,
oprtr IN INTEGER,
leadscount OUT INTEGER)

is
BEGIN

SELECT COUNT(*) FROM LEADS_DELETED INTO leadscount;

COMMIT;
END LEAD_PURGE;

3 个答案:

答案 0 :(得分:18)

INTO条款是错误的。它应该是:

SELECT COUNT(*) INTO leadscount FROM LEADS_DELETED

答案 1 :(得分:6)

您将into放在错误的位置。

尝试这样的事情,然后从那里开始:

declare
  cnt number;
begin
  select count(*) 
  into cnt
  from leads_delete;
end;

答案 2 :(得分:0)

另一种方式:

import {
  createStyles,
  Theme,
  withStyles,
  Step
} from "@material-ui/core";

const CustomStep = withStyles((theme: Theme) =>
  createStyles({
    // Input your style here
  })
)(Step);

export default function Dashboard() {
   return (....)
}