Search notes:

Oracle hint: QB_NAME

The qb_name hint specifies the value with which the column qblock_name in the plan_table is filled.
create table TQ84_A (id  number, txt varchar2(10));
create table TQ84_B (id  number, txt varchar2(10));

explain plan for
select /*+ no_merge(v) qb_name(qry) */
   a.id,
   a.txt,
   v.txt
from
   TQ84_A  a,
  (select /*+ qb_name(vw) */
      b.id,
      b.txt
   from
      TQ84_B b
  ) v
where
  a.id = v.id;

select * from dbms_xplan.display(format=>'basic alias');
--
-- --------------------------------------
-- | Id  | Operation           | Name   |
-- --------------------------------------
-- |   0 | SELECT STATEMENT    |        |
-- |   1 |  HASH JOIN          |        |
-- |   2 |   TABLE ACCESS FULL | TQ84_A |
-- |   3 |   VIEW              |        |
-- |   4 |    TABLE ACCESS FULL| TQ84_B |
-- --------------------------------------
--  
-- Query Block Name / Object Alias (identified by operation id):
-- -------------------------------------------------------------
--  
--    1 - QRY
--    2 - QRY / "A"@"QRY"
--    3 - VW  / "V"@"QRY"
--    4 - VW  / "B"@"VW"

drop table TQ84_A;
drop table TQ84_B;

See also

Query blocks
Other hints

Index