Simple SQL question
From: Rookie <Rookie.Programmer_at_gte.net>
Date: 2000/02/17
Message-ID: <cKRq4.353$CL6.3080_at_dfiatx1-snr1.gtei.net>#1/1
Date: 2000/02/17
Message-ID: <cKRq4.353$CL6.3080_at_dfiatx1-snr1.gtei.net>#1/1
[Quoted] I would like to use a procedure for a simple select statement, so that it can be called by the same name each time anywhere from an application. I would like to use something like this:
CREATE OR REPLACE PROCEDURE GET_USER
(
USERNAME IN VARCHAR2, USERPASSWORD IN VARCHAR2, USERID OUT NUMBER)
AS
BEGIN
SELECT TBL_USERS.USER_ID
INTO USERID
FROM TBL_USERS
WHERE TBL_USERS.USER_NAME = USERNAME AND TBL_USERS.USER_PASSWORD = USERPASSWORD;
END; Where each time the procedure get_user gets called from a java application, the user id will get returned when the username and the userpassword is given as parameters.
Please help. Thanks in advance! Received on Thu Feb 17 2000 - 00:00:00 CET