Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 390479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:58:07+00:00 2026-05-12T15:58:07+00:00

I am new to Oracle. Is there a builtin keyword does the same job

  • 0

I am new to Oracle. Is there a builtin keyword does the same job of SQL Server APPLY?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:58:07+00:00Added an answer on May 12, 2026 at 3:58 pm

    I think the equivalent of the APPLY clause in Oracle is called a lateral JOIN. A lateral join in Oracle is when you join a table A with a function F that outputs rows and this function has columns of A as parameters.

    Let’s build a small example with this setup:

    SQL> CREATE OR REPLACE TYPE emp_row AS OBJECT (
      2     empno NUMBER(4),
      3     ename VARCHAR(10),
      4     job VARCHAR(9),
      5     deptno NUMBER(2)
      6  );
      7  /
    
    Type created
    SQL> CREATE OR REPLACE TYPE emp_tab AS TABLE OF emp_row;
      2  /
    
    Type created
    SQL> CREATE OR REPLACE FUNCTION get_emp_dept(p_deptno NUMBER) RETURN emp_tab IS
      2     l_result emp_tab;
      3  BEGIN
      4     SELECT emp_row(empno, ename, job, deptno)
      5       BULK COLLECT INTO l_result
      6       FROM emp
      7      WHERE deptno = p_deptno;
      8     RETURN l_result;
      9  END get_emp_dept;
     10  /
    
    Function created
    

    A lateral join is automatic in Oracle, there is no special keyword:

    SQL> SELECT dept.dname, emp.empno, emp.ename, emp.job
      2    FROM dept
      3   CROSS JOIN TABLE(get_emp_dept(dept.deptno)) emp;
    
    DNAME          EMPNO ENAME      JOB
    -------------- ----- ---------- ---------
    ACCOUNTING      7782 CLARK      MANAGER
    ACCOUNTING      7839 KING       PRESIDENT
    ACCOUNTING      7934 MILLER     CLERK
    RESEARCH        7369 SMITH      CLERK
    RESEARCH        7566 JONES      MANAGER
    RESEARCH        7788 SCOTT      ANALYST
    RESEARCH        7876 ADAMS      CLERK
    RESEARCH        7902 FORD       ANALYST
    SALES           7499 ALLEN      SALESMAN
    SALES           7521 WARD       SALESMAN
    SALES           7654 MARTIN     SALESMAN
    SALES           7698 BLAKE      MANAGER
    SALES           7844 TURNER     SALESMAN
    SALES           7900 JAMES      CLERK
    
    14 rows selected
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new at working with oracle, my only experience is in sql server.
I am new to the SQL/Oracle, and wondering if there's an easy way to
Is there a reason why Oracle is case sensitive and others like SQL Server,
I'm still new to SQL (Oracle).. Basically on a table I'm selecting from, there
I'm very new to Oracle and was wondering if there's a way either through
I am new to Oracle, and there is an issue I am facing. When
Hey, I am new to Oracle SQL and I am trying to make a
Oracle'c COLLECT function triggers creation of a new collection type. Is there a way
Excuse me but I am very new at learning to use oracle and sql.
I am new to Oracle PL/SQL and am having some difficulty conceptualizing collections with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.