¼òµ¥Í³¼Æsql - Oracle / »ù´¡ºÍ¹ÜÀí
ÈçÌ⣺
ͳ¼Æ±íÖÐ×òÌìÿ¸ô10·ÖÖӵļǼÊý¡£
ʱ¼ä¶ÎÖÐÓоÍÏÔʾ¾ßÌåcountÊý£¬Ã»ÓоÍÏÔʾ0£¡
SQL code:
create table tb(id number, dtime date)
insert into tb (id, dtime)
values (1, to_date('2010-05-26 15:17:06', 'dd-mm-yyyy hh24:mi:ss'))
/
insert into tb (id, dtime)
values (2, to_date('2010-05-26 15:23:06', 'dd-mm-yyyy hh24:mi:ss'))
/
insert into tb (id, dtime)
values (3, to_date('2010-05-26 15:25:08', 'dd-mm-yyyy hh24:mi:ss'))
/
insert into tb (id, dtime)
values (4, to_date('2010-05-26 16:23:06', 'dd-mm-yyyy hh24:mi:ss'))
/
insert into tb (id, dtime)
values (5, to_date('2010-05-26 16:51:44', 'dd-mm-yyyy hh24:mi:ss'))
/
insert into tb (id, dtime)
values (6, to_date('2010-05-26 17:02:44', 'dd-mm-yyyy hh24:mi:ss'))
/
insert into tb (id, dtime)
values (7, to_date('2010-05-26 17:11:30', 'dd-mm-yyyy hh24:mi:ss'))
/
insert into tb (id, dtime)
values (8, to_date('2010-05-26 18:14:44', 'dd-mm-yyyy hh24:mi:ss'))
/
insert into tb (id, dtime)
values (9, to_date('2010-05-26 19:11:30', 'dd-mm-yyyy hh24:mi:ss'))
/
insert into tb (id, dtime)
values (10, to_date('2010-05-26 19:14:44', 'dd-mm-yyyy hh24:mi:ss'))
/
Ï£Íû´ó¼ÒÓ»Ô¾½â´ð£¡Ð»Ð»£¡
ÎÊÌâ×Ô¼º½â¾öÁË£¡
SQL code:
selec
Ïà¹ØÎÊ´ð£º
×Ö¶Î1,×Ö¶Î2.....×Ö¶ÎN,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
ÏëÒªµÄ½á¹ûÊÇ:
1,Na ......
ÕâÀïÏëÁ˽âÏ£¬¹ØÓÚSQL ServerÖзÖÒ³ºÍOracleÖзÖÒ³£»
ƽ³£Ð´Ó¦ÓóÌÐòµÄʱºò£¬±ÈÈçÓõÄÓïÑÔÊÇJava£¬ÓиöÁбíÒ³Ã棬ÐèÒª¶ÔÊý¾Ý·ÖÒ³ÏÔʾ£»
ÕâÀïÒª·ÖÒ³ÄѵÀ²»ÐèÒª½èÖúJava£¬¶øÖ±½ÓsqlÄÜÖªµÀ·ÖÒ³Âð£¬ÆðÂëÒ²Òª´«¸öÒ³Âë½ ......
oracle ͨ¹ýBDlink Á¬½Óµ½Ò»Ì¨MS SQL,²éѯ¶¼¿ÉÒÔ,µ«ÊDz»ÖªµÀÈçºÎÔÚoracleͨ¹ýDBLinkµ÷ÓÃMS SQLµÄ´æ´¢¹ý³Ì,Çó½â~лл~
ÒýÓÃ
oracle ͨ¹ýBDlink Á¬½Óµ½Ò»Ì¨MS SQL,²éѯ¶¼¿ÉÒÔ,µ«ÊDz»ÖªµÀÈçºÎÔÚoracleͨ¹ýDBLinkµ÷ÓÃM ......
SQL code:
CREATE OR REPLACE PROCEDURE usp_refreshTopN IS
BEGIN
--Îĵµ
INSERT INTO topnresource(resourceId,title,type,cover,brief,properUser,tag,clickAmount,createDate,topNCreateDate,organizat ......
ÔÚAccessµÄ²éѯÖÐÖ´ÐÐÏÂÃæµÄÓï¾ä,ÎÞЧ,ÌáʾÆÚ´ýselect ,updata ,...
CreateTble C=Answer N="»ØÌû±í"
(
C=ID T="INTEGER" P=No M=No N="񅧏" Z=false,
C=Ques ......