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
Ankit Shukla
NA
681
116.4k
How to write stored procedure for this problem
Jun 15 2020 2:20 AM
Hello,
I have 2 tables.
Table1: Emp_Profile
Emp_Code Emp_Name Rank Salary
E1 A 1 40K
E2 B 2 30K
E3 C 3 25K
E4 D 3 25K
Table2: Emp_Promotion
Emp_Code Rank
E2 1
E3 2
I need all emp. details but condition is: If employee is promoted, then Rank will comes from Emp_Promotion table.
Output looks like:
Emp_Code Emp_Name Rank Salary
E1 A 1 40K
E2 B 1 30K
E3 C 2 25K
E4 D 3 25K
Please help.
Reply
Answers (
4
)
LIKE Operator or any Equiavelant
SQLite data base takes more timer to run inner join query