I have a table like this:
CST_ID CST_NAME CST_TYPE PYMENT_MODE TOTAL_PAYMENT
----------------------------------------------------
105 Jyothy Regular Full 15900
101 Alveena Regular half 15800
102 Nizam Regular Full 15500
100 Hari Regular Full 14500
103 Sharath Partime Full 17500
104 Jipsy Shifted Full 18000
I created a stored procedure for getting the row that I called from the procedure with the primary key valued field (here cst_id
) as
CREATE or replace PROCEDURE sp_slct (cst_id NUMBER) AS
tot_id NUMBER;
--ls_name varchar2,
--ls_type varchar2,
--ls_mode varchar2,
--ls_pymnt int;
BEGIN
select
cst_id, cst_name, cst_type, payment_mode, total_payment into
ls_name, ls_type, ls_mode, ls_pymnt from tbl_cst
where
tbl_cst.cst_id = sp_slct.cst_id;
END sp_slct;
but I'm getting the errors in compilation
How do I get the result to select a row with the ID that I given as the input to the procedure?