TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Debopriyo Dey
NA
51
15.1k
Please correct my code (Login Registration)
Oct 4 2017 9:37 AM
I need to return "-1" if username exixts and i need to return 1 if username is new and then insert values into table. This procedure is for Registering UserName and Password For Login -------------------------------------------------------------------------------------------------------------- CREATE OR REPLACE PROCEDURE debopriyo_savelogindetails ( p_nameofuser debopriyo_logindetailstable.nameofuser%TYPE, p_username debopriyo_logindetailstable.username%TYPE, p_userpassword debopriyo_logindetailstable.userpassword%TYPE ) IS v_count number; v_returncode number; BEGIN select count(t.username) into v_count from debopriyo_logindetailstable t; if(v_count>0) then v_returncode := -1; ELSE v_returncode := 1; INSERT INTO debopriyo_logincredentials (nameofuser, username, userpassword) VALUES (p_nameofuser, p_username, p_userpassword); END IF; RETURN v_returncode; END;
Reply
Answers (
2
)
for an career advice please try to help me out.
how to solve this problem