Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PL/SQL³£Óþ䷨

1¡¢Ñ­»·²åÈë²âÊÔÊý¾Ý£º
SQL>
declare
maxrecords constant int:=100;
i int :=1;
Begin
for i in 1..maxrecords loop

--²åÈëÊý¾Ý
Insert into TEST.EXAMPLE(name,phone,address) values('·ÖÒ³²âÊÔÊý¾Ý....','ÁªÏµµç»°','ÁªÏµµØÖ·');
end loop;
commit;
end;
´Ë´¦EXAMPLE±í¶¨ÒåΪ(ID number,name varchar2(50),phone varchar2(50),address varchar2(50)),ÇÒIDͨ¹ý´¥·¢Æ÷ʵÏÖ×ÔÔö¼Ó¡£
´¥·¢Æ÷ÄÚÈÝÈçÏ£º
begin
select emp_sequence.nextval into :new.id from dual;
end;
ÔÚ²åÈëµ½191Ìõ¼Ç¼ʮ£¬³öÏÖÈçÏ´íÎ󣬲»ÖªµÀΪʲô£¬ÒÔºóÔÙ¿´
ORA-06502: PL/SQL: Êý×Ö»òÖµ´íÎó : ÊýÖµ¾«¶ÈÌ«¸ß
ORA-06512: ÔÚ"TEST.TIB_EXAMPLE", line 3
ORA-04088: ´¥·¢Æ÷ 'TEST.TIB_EXAMPLE' Ö´Ðйý³ÌÖгö´í
...
2¡¢Á½ÖÖoracleµÄ·ÖÒ³·½·¨£º
¢Ù²ÉÓÃrownum¹Ø¼ü×Ö(Èý²ãǶÌ×)
SELECT * from(
SELECT A.*,ROWNUM
num from
(SELECT * from t_order)A
WHERE
ROWNUM<=15)
WHERE num>=5;
--·µ»ØµÚ5-15ÐÐÊý¾Ý
¢Ú²ÉÓÃrow_number½âÎöº¯Êý½øÐзÖÒ³(ЧÂʸü¸ß)
SELECT xx.* from(
SELECT t.*,row_number() over(ORDER BY o_id)AS num
from t_order t
)xx
WHERE num BETWEEN 5 AND 15;
--·µ»ØµÚ5-15ÐÐÊý¾Ý
½âÎöº¯ÊýÄÜÓøñʽ
º¯Êý() over(pertion by ×ֶΠorder by ×Ö¶Î);
Pertion °´ÕÕij¸ö×ֶηÖÇø
Order °´ÕÕij¸ö×Ö¶ÎÅÅÐò


Ïà¹ØÎĵµ£º

ExcelÊý¾Ýµ¼ÈëSql Server³öÏÖNull

ÔÚExcelÖУ¬ÎÒÃÇʱ³£»áÅöµ½ÕâÑùµÄ×Ö¶Î(×î³£¼ûµÄ¾ÍÊǵ绰ºÅÂë)£¬¼´Óд¿Êý×ÖµÄ(ÈçûÓдøÇøºÅµÄµç»°ºÅÂë)£¬ÓÖÓÐÊý×ÖºÍÆäËü×Ö·û»ìºÏ (Èç“ÇøºÅ-µç
»°ºÅÂë”)µÄÊý¾Ý£¬ÔÚµ¼ÈëSQLServer¹ý³ÌÖУ¬»á·¢ÏÖҪô´¿Êý×ÖµÄÊý¾Ýµ¼¹ýÈ¥Ö®ºó±ä³ÉÁËNULL£¬ÒªÃ´¾ÍÊÇÊý×ÖºÍÆäËü×Ö·û»ìºÏµÄÊý¾Ýµ¼¹ýÈ¥Ö®ºó±ä³É
ÁËNULL¡£
  &n ......

SQL Server BI Step by Step SSRS 1

  ½ñÌìÎÒÃÇ¿ªÊ¼SQL SERVER BIµÄÁíÍâÒ»¸öÖØÒªµÄ²¿·Ö --Reporting Service£¬Ïà¶ÔÓÚIntegration ServiceºÍAnalysis Service£¬Reporing ServiceÔÚ¹úÄÚµÄʹÓÃÕßÓ¦¸Ã¶àºÜ¶à.Ò»·½ÃæÓÉÓÚReporing Service·ÑÓñȽϵͣ¬Ö±½Ó¸½ÊôÔÚSQL SERVERÖУ¬ÁíÍâÒ»·½ÃæÆäʵSSRSÔںܴó³Ì¶ÈÉÏ»¹ÊÇÂú×ãÎÒÃǵı¨±íÐèÇóµÄ¡£ ÔÚSQL Server 2008ÖУ¬ ......

[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(¶þ)

±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Ò»)--sum()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(¶þ)--max()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Èý)--row_number() /rank()/dense_rank()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(ËÄ)--lag()/lead()
Èç¹ûÎÒÃÇ°´ÕÕʾÀýÏëµÃµ½Ã¿¸ö²¿ÃÅнˮֵ×î¸ßµÄ¹ÍÔ±µÄ¼Í¼£¬¿ÉÒÔÓÐËÄÖÖ·½·¨ÊµÏÖ£ ......

[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Èý)

±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Ò»)--αÁÐROWNUMʹÓü¼ÇÉ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(¶þ)--±êÁ¿×Ó²éѯ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Èý)--PackageµÄÓŵã
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(ËÄ)--ÅúÁ¿´¦Àí
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Îå)--µ÷Óô洢¹ý³Ì·µ»Ø½á¹û¼¯
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Áù)- ......

[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Îå)

±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Ò»)--αÁÐROWNUMʹÓü¼ÇÉ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(¶þ)--±êÁ¿×Ó²éѯ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Èý)--PackageµÄÓŵã
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(ËÄ)--ÅúÁ¿´¦Àí
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Îå)--µ÷Óô洢¹ý³Ì·µ»Ø½á¹û¼¯
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Áù)- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ