摘要: 一。字符函数select concat('hello','world') from dual; --合并字符串 ,合并字段值 helloworldselect substr('helloWorld',2,4) from dual; --截取字符串 elloselect length('helloWorld') from dual; --10select instr('helloWorld','o') from dual; --5,索引字符select lpad('123',6, 阅读全文
posted @ 2011-09-08 16:10 cnby 阅读(2791) 评论(0) 推荐(0) 编辑
摘要: 1 。列别名:select empno "aa" from emp; 必须为双引号。select empno as aa from emp; 2.列,字符串连接符select empno|| ename from emp;字符串只能在单引号中出现 select last_name || 'is a'|| job_id as "employee Details” from employee; 3.显示表结构desc emp; 4字符和日期 1.字符和日期要包含在单引号中。 2.字符大小写敏感,日期格式敏感。日期默认格式 dd-mon-rrselect 阅读全文
posted @ 2011-09-08 11:04 cnby 阅读(898) 评论(0) 推荐(0) 编辑
摘要: 1.空值是无效的,未指定的,未知的或不可预知的值2 空值不是空格 或者 03,任何与null 的运算都返回 空。 阅读全文
posted @ 2011-09-08 08:51 cnby 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 例如:要查看 scott 具有的角色,可查询 dba_role_privs; SQL> select * from dba_role_privs where grantee='SCOTT'; //查询 orale 中所有的系统权限,一般是dba select * from system_privilege_map order by name; //查询 oracle 中所有对象权限,一般是dba select distinct privilege from dba_tab_privs; //查询 oracle 中所有的角色,一般是dba select * from dba 阅读全文
posted @ 2011-09-08 08:37 cnby 阅读(9580) 评论(0) 推荐(0) 编辑