| |

VerySource

 Forgot password?
 Register
Search
View: 844|Reply: 3

`` How to dynamically define variables in the program? ''

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Invalid IP Address

Post time: 2020-3-11 09:30:01
| Show all posts |Read mode
In Oracle, how to dynamically define variables in the middle of a program to use when fetching data in a cursor. The number of variables to be defined and the type of the variable are unknown in advance.
But the number of variables and the type of variables can be found, `` How do you dynamically define these variables? ?
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-6-4 22:00:02
| Show all posts
declare cursor mycur is

  select * from table1;
  
m_mycur mycur%ROWTYPE;

After opening the cursor, use m_mycur.XX to become ~~
Reply

Use magic Report

1

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 Invalid IP Address

Post time: 2020-6-7 17:15:01
| Show all posts
The variables to be defined are not necessarily all in one table

It may be a table

It may also be some fields in a table

There may be some fields in several tables
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-7-15 23:15:01
| Show all posts
You should have no way
Too many variables
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list