How can I join 3 tables using JOIN keyword

610 pts.
Tags:
JOIN statement
PL/SQL
SELECT statement
SQL
SQL Query
WHERE statement
Hi Experts, Pls hlp me with my query How can i join 3 tables using JOIN Keyword inside PL/SQL block in SELECT ... WHERE clause Query 3 Tables namely Reg,ROOTS,ME and the select statement takes both parameter variable and local variable Thanks!!!!!

Answer Wiki

Thanks. We'll let you know when a new response is added.

The basic syntax will be something like this.

<pre>SELECT *
FROM Reg
JOIN ROOTS ON Reg.Column2 = ROOTS.Column1
JOIN ME ON ROOTS.Column3 = ME.Column1
WHERE Reg.Column5 = ‘test'</pre>

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Inprise
    Yes i did similar code pls find below the same and error i am still getting My Select stm hav both IN parameter variable(p_rdc) and local variables (v_et,v_ftd,v_rtd) and getting 2 error messages 1.SQL stm Ignorned and Error(19,75): PL/SQL: ORA-00923: FROM keyword not found where expected SELECT rdc INTO p_rdc,et INTO v_et, ftd INTO v_ftd,rtd INTO v_rtd FROM reg JOIN roots ON reg.rtd = roots.rtd JOIN me ON me.etd = roots.rtd WHERE Deleted = 0 AND me.eud = p_eud;
    610 pointsBadges:
    report
  • carlosdl
    You need to change your first 2 lines to: SELECT rdc,et,ftd,rtd INTO p_rdc, v_et, v_ftd, v_rtd
    70,220 pointsBadges:
    report
  • Inprise
    Thanks it fixed my issue..
    610 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following