-- 1. 使用一个变量 declare -- Local variables here v_name ); begin -- Test statements here select t.user_name into v_name from pay_mer_order t ; dbms_output.put_line(v_name); end; -- 2. 使用多个变量 declare -- Local variables here v_name ); v_trans_no ); v_app_c…
select * from protype;select * from product;---笛卡尔连接查询(交叉连接)select * from protype,product;select * from protype cross join product;---标准写法---内链接查询select * from protype pt,product pd where pt.pt_id=pd.p_type;select * from protype pt inner join product…
一:PL/SQL时间相关类型 PL/SQL提供两个和日期时间相关的数据类型: 日期时间(Datetime)数据类型 时间间隔类型 二:日期时间类型 datetime数据类型有: DATE TIMESTAMP TIMESTAMP WITH TIME ZONE TIMESTAMP WITH LOCAL TIME ZONE 三:时间间隔类型 INTERVAL YEAR TO MONTH INTERVAL DAY TO SECOND 四:日期时间类型 和 时间间隔类型 的可能字段 字段名称 有效日期…