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 7412997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:37:40+00:00 2026-05-29T06:37:40+00:00

Is it possible to have a sql query like this embedded somewhere in a

  • 0

Is it possible to have a sql query like this embedded somewhere in a stored procedure :

Select id, val from prmtable where id in ('app','config');

Can this parameter list be initialised at runtime with any number of string values(both number and values of the strings at runtime) at the discretion of the user? If yes, then how is it done?

  • 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-29T06:37:41+00:00Added an answer on May 29, 2026 at 6:37 am

    If you need a dynamic number of parameters, you could create a type

    CREATE TYPE my_type AS TABLE OF VARCHAR2(128);
    

    and pass this table as parameter for your procedure

    CREATE OR REPLACE PROCEDURE my_procedure( vals IN my_type ) AS
    BEGIN
      FOR c IN (
        SELECT dummy
          FROM dual
         WHERE dummy IN ( SELECT column_value FROM TABLE( vals ) )
      ) LOOP
        dbms_output.put_line( c.dummy );
      END LOOP;
    END my_procedure;
    

    This procedure can then be executed like this:

    EXEC my_procedure( NEW my_type( 'X', 'Y' ) );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL query that does some ranking, like this: SELECT RANK() OVER(PARTITION
Is it possible in SubSonic to make a query like this SELECT * FROM
I have a query like this: select data_name into v_name from data_table where data_table.type
I have this postgres sql query: select * from stats where athlete_id = 5
I have SQL query like SELECT *, dbo.func(@param1, a.point) as fValue FROM dbo.table AS
I have a query like this: SELECT A, B, C, CASE WHEN 1 =
I'm not sure if this is possible from with a SQL query, but I'll
I have the following sql query for transforming data but is it possible to
Possible Duplicate: SQL Server Database query help Hi, I have a problem that I
It is possible in SQL Server Express have a log of all operations SELECT

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.