given an employee number,display the following information to the user:
employee name
employee sectionNo
employee Designation
1 对应vice president
2 对应senior manager
3 对应assistant manageruse the &rowtype declaration for obtaining the employee information from the tables;
如果用decode能做出来吗?
employee name
employee sectionNo
employee Designation
1 对应vice president
2 对应senior manager
3 对应assistant manageruse the &rowtype declaration for obtaining the employee information from the tables;
如果用decode能做出来吗?
解决方案 »
- 数据位数问题
- oracle 10g 如何更改端口号?
- OracleParameter 参数问题
- oracle初级问题一起问
- 一道网络管理员考试题,大家讨论一下!
- ORacle静态端口
- [急求] 同一个oracle服务器 上有两个数据库, 请问怎么同时操作两个数据库. 也就是说可以用一条sql 操作两个数据库
- OracleTNSListener服务不能启动,帮忙啊
- ORA01033:Oracle init or shutdown in progress 这种错误该怎么解决啊,看看我的方法对么
- 请高人指点:12545错误只发生在不同网段
- 30求一个oracle日期计算问题,虚心请教各位哥哥姐姐.很急..... 在线等...
- 升星了。。。散分感谢大家给我分升星!
n NUMBER;
BEGIN
n:=DECODE(1,2,3,4,5);
END;
/ n:=DECODE(1,2,3,4,5);
*
ERROR at line 4:
ORA-06550: line 4, column 5:
PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL statement only
ORA-06550: line 4, column 2:
PL/SQL: Statement ignored
但是放到select语句里就可以了.DECLARE
n NUMBER;
BEGIN
SELECT DECODE(1,2,3,4,5)
INTO n
FROM dual;
END;
/PL/SQL procedure successfully completed.