1.UID
返回标识当前用户的唯一整数SQL> show userUSER 为"GAO"SQL> select username,user_id from dba_users where user_id=uid;USERNAME USER_ID
------------------------------ ---------GAO 252.USER
返回当前用户的名字SQL> select user from dual;USER
------------------------------GAO
3.ESCAPE
escape关键字经常用于使某些特殊字符,如通配符:'%','_'转义为它们原来的字符的意义,被定义的转义字符通常使用'\',但是也可以使用其他的符号。
eg:
视图
create or replace VIEW view1 as
select 'yaobo' as vname from dualunion allselect 'bxxx' as vname from dualunion allselect 'xyz' as vname from dualunion allselect '_%xxx_' as vname from dualunion allselect '_\xx' as vname from dual;select * from view1 where vname like '_\\xx%' escape '\'; --将‘\'转义成字符
select * from view1 where vname like '\_%xx%' escape '\'; --将‘_'转义成字符,在sql中('_'代表任意单个字符)