复制代码 代码如下:
select ename,sal,job from emp where sal > 2500 union select ename,sal,job from emp where job = 'MANAGER';
复制代码 代码如下:
update emp set (job,sal,comm)=(select job,sal,comm from emp where ename = 'SMITH') where ename = 'SCOTT';
复制代码 代码如下:
set transaction read only;
复制代码 代码如下:
select lower(ename),sal from emp;
复制代码 代码如下:
select * from emp where length(ename)=5;
select substr(ename,1,3) from emp;
复制代码 代码如下:
select upper(sub(ename,1,1) from emp;
复制代码 代码如下:
<PRE class=sql>select lower(substr(ename,2,length(ename)-1)) from emp;</PRE><BR>
然后将两个结果合并,则得到了要显示的内容:
<PRE></PRE>
<PRE class=sql sizcache="0" sizset="11"><PRE class=sql>select upper(substr(ename,1,1))||lower(substr(ename,2,length(ename)-1)) as name from emp;</PRE><BR>
替换函数replace
<PRE></PRE>
<PRE class=sql sizcache="0" sizset="14"><PRE class=sql>select replace(ename,'A','我') from emp;</PRE><BR>
<BR>
<BR>
<PRE></PRE>
</PRE></PRE>
新闻热点
疑难解答