Home > database >  How to define a variable from a toad in SQL
How to define a variable from a toad in SQL

Time:09-25

How to define a variable from a toad in SQL?
Example
Define sc='690126';
Select * from stud the where id='& amp; Sc ';
Select * from ZCK where id='& amp; Sc ';

CodePudding user response:

Unable to define variables in the SQL to define variables only using PL/SQL blocks,

The code is similar to:
 
Declare
Sc varchar2 (20) :='690126'.
The begin
Select * from stud the where id=sc; - the results of a query need to define a cursor to receive,
The end;
  • Related