声明一个记录类型,定义记录类型变量,保存员工信息
2015-10-03 22:22
429 查看
declare
Type t_emp is record(deptno employees.departmentid%type,
fname employees.firstname%type,
sal employees.salary%type);
v_emp t_emp;
begin
select departmentid, firstname, salary
into v_emp
from employees
where employeeid = 109;
dbms_output.put_line(v_emp.deptno || ' ' || v_emp.fname || ' ' ||
v_emp.sal);
end;
Type t_emp is record(deptno employees.departmentid%type,
fname employees.firstname%type,
sal employees.salary%type);
v_emp t_emp;
begin
select departmentid, firstname, salary
into v_emp
from employees
where employeeid = 109;
dbms_output.put_line(v_emp.deptno || ' ' || v_emp.fname || ' ' ||
v_emp.sal);
end;
相关文章推荐
- matlab中hold指令、figure指令及subplot指令的使用
- ubuntu安装dbench
- LCS(模拟,寻找有多少个循环)
- Memory, Data, and Addressing
- CentOS 6.7下PXE+Kickstart无人值守安装操作系统
- Sql日期时间格式转换
- HDU 5491 The Next 2015 ACM/ICPC Asia Regional Hefei Online1008
- SQL获取当前时间(日期)
- 10.03JAVA应用学习知识点
- 捕获TextView超链接
- Android Fragment切换动画效果
- HDU 4777 Rabbit Kingdom (2013杭州赛区1008题,预处理,树状数组)
- You have not agreed to the Xcode license.
- ContentTools – 所见即所得(WYSIWYG)编辑器
- CSDN下载积分获取
- CSDN下载积分获取
- HDU 5494 Card Game(排个序就可以了)——BestCoder Round #58(div.2)
- c++11支持类数据成员的初始化
- [INS-41112] Specified network interface doesnt maintain connectivity across cluster nodes.
- 关于AVAudioPlayer