oracleÖÐʵÏÖÖ÷¼ü×Ô¶¯Éú³É
IDÊÇÖ÷½¡£¬ÊµÏÖ²åÈëÒ»¸öNAME,ID×Ô¶¯Ôö¼Ó
SQL> create table t1
2 (
3 id number,
4 name varchar2(10)
5 )
6 ;
SQL> create sequence T1ID_SEQ
2 minvalue 1
3 maxvalue 999999
4 start with 1
5 increment by 1
6 cache 20
7 ;
´´½¨´¥·¢Æ÷
sql> create or replace trigger tr
before insert on table for each row
begin
select to_char(seq.nextval) into :new.id form dual;
end tr;
/
Ïà¹ØÎĵµ£º
Ò»¡¢×¼±¸ÌØÊâÊý¾Ý
create table t_escape(s varchar2(50));
--show define -- define "&" (hex 26)
--show escape -- escape off
set define off
set escape on
insert into t_escape values('string&text');
insert into t_escape values('string\&text');
insert into t_escape values('st ......
1.ÔÚOracle ÖУ¬Äã»áÁ˽⵽£º
ÊÂÎñÊÇÿ¸öÊý¾Ý¿âµÄºËÐÄ£¬ËüÃÇÊÇ“ºÃ¶«Î÷”¡£
Ó¦¸ÃÑÓ³Ùµ½Êʵ±µÄʱ¿Ì²ÅÌá½»¡£²»ÒªÌ«¿ìÌá½»£¬ÒÔ±ÜÃâ¶Ôϵͳ´øÀ´Ñ¹Á¦¡£ÕâÊÇÒòΪ£¬Èç¹û
ÊÂÎñºÜ³¤»òºÜ´ó£¬Ò»°ã²»»á¶ÔϵͳÓÐѹÁ¦¡£ÏàÓ¦µÄÔÔòÊÇ£ºÔÚ±ØҪʱ²ÅÌá½»£¬µ«ÊÇ´ËÇ°²»ÒªÌá
½»¡£ÊÂÎñµÄ´óСֻӦ¸Ã¸ù¾ÝÒµÎñÂß¼À´¶¨¡£
Ö»ÒªÐèÒ ......
1.Çó²¿ÃÅÖÐÄÄЩÈËнˮ×î¸ß£º
select ename,sal
from emp join
(
select max(sal) max_sal, deptno
from emp
group by deptno
) t
on (emp.sal = t.max_sal and emp.deptno = t.deptno);
2.Çó²¿ÃÅƽ¾ùнˮµÄµÈ¼¶£º
select deptno, avg_sal, grade ......
Ëæ׿ÆËã»úµÄÆÕ¼°ÒÔ¼°ÍøÂçµÄ·¢Õ¹£¬Êý¾Ý¿âÒѾ²»ÔÙ½ö½öÊÇÄÇЩ³ÌÐòÔ±ËùרÓеĻ°Ìâ¡£¶øOracleÊý¾Ý¿â¸üÊÇƾ½èÆäÐÔÄÜ׿Խ£¬²Ù×÷·½±ãÁé»îµÄÌص㣬ÔÚÊý¾Ý¿âµÄÊг¡ÖÐÒѾռ¾ÝÁËһϯ֮µØ¡£µ«ÊÇͬÑùËæ×ÅÍøÂç¼¼ÊõµÄ²»¶Ï½ø²½£¬Êý¾ÝÐÅÏ¢µÄ²»¶ÏÔö¼Ó£¬Êý¾Ý°²È«ÒѾ²»ÔÙÊÇÒÔÇ°µÄ“ÀÏÉú³¤Ì¸”£¬Ò²¸ü²»ÊÇÒÔÇ°Êé±¾ÉÏÄÇЩ“¿ÉÍû² ......
½«±í¿Õ¼äºÍÊý¾ÝÎļþ´ÓÒ»¸öλÖÃÒƶ¯µ½ÁíÒ»¸öλÖõIJÙ×÷·½·¨
Ò»£® OFFLINE
OFFLINE ·ÖΪALTER DATABASE Óë ALTER TABLESPACE OFFLINE£¬
ËûÃǵÄÇø±ð²Î¿´blog£ºhttp://blog.csdn.net/tianlesoftware/archive/2009/11/29/4898800.aspx
°´Êý¾ÝÎļþÀ´£º
1.ÏȽ«ÏàÓ¦µÄÊý¾ÝÎļþ offl ......