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

sql Óï¾ä¶Ôʱ¼ä²Ù×÷µÄ×ܽá

ÔÚSQLÓï¾äÖУ¬³£³£Óûá¶Ôʱ¼ä£¨»òÈÕÆÚ£©½øÐÐһЩ´¦Àí£¬ÏÂÃæÊDZȽÏͨÓõÄһЩÓï¾ä£º
ÑÓ³Ù£º
sysdate+(5/24/60/60)          ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5Ãë
sysdate+5/24/60               ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5·ÖÖÓ
sysdate+5/24                  ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5Сʱ
sysdate+5                     ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5Ìì
add_months(sysdate,-5)        ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5ÔÂ
add_months(sysdate,-5*12)     ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5Äê
ÉÏÔÂÄ©µÄÈÕÆÚ£º
select last_day(add_months(sysdate, -1)) from dual;
±¾ÔµÄ×îºóÒ»Ã룺
select trunc(add_months(sysdate,1),'MM') - 1/24/60/60 from dual
±¾ÖÜÐÇÆÚÒ»µÄÈÕÆÚ£º
select trunc(sysdate,'day')+1 from dual
Äê³õÖÁ½ñµÄÌìÊý£º
select ceil(sysdate - trunc(sysdate, 'year')) from dual;
½ñÌìÊǽñÄêµÄµÚ¼¸ÖÜ :
select to_char(sysdate,'fmww') from dual
½ñÌìÊDZ¾Ôµĵڼ¸ÖÜ:
SELECT TO_CHAR(SYSDATE,'WW') - TO_CHAR(TRUNC(SYSDATE,'MM'),'WW') + 1 AS "weekOfMon" from dual
±¾ÔµÄÌìÊý
SELECT to_char(last_day(SYSDATE),'dd') days from dual
½ñÄêµÄÌìÊý
select add_months(trunc(sysdate,'year'), 12) - trunc(sysdate,'year') from dual
ϸöÐÇÆÚÒ»µÄÈÕÆÚ
SELECT Next_day(trunc(SYSDATE),'monday') from dual
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
¼ÆË㹤×÷ÈÕ·½·¨
create table t(s date,e date);
alter session set nls_date_format = 'yyyy-mm-dd';
insert into t values('2003-03-01','2003-03-03');
insert into t values('2003-03-02','2003-03-03');
insert into t values('2003-03-07','2003-03-08');
insert into t values('2003-03-07','2003-03-09');
insert into t values('2003-03-05','2003-03-07');
insert into t values('2003-02-01','2003-03-31');
-- ÕâÀï¼Ù¶¨ÈÕÆÚ¶¼ÊDz»´øʱ¼äµÄ£¬·ñÔòÔÚËùÓÐÈÕÆÚÇ°¼Ótrunc¼´¿É¡£


Ïà¹ØÎĵµ£º

SQL Êý¾Ý¿â¼ä¸´ÖƱí

·½·¨Ò»£º
DB1  tb1  
DB2  tb2
Ñ¡ÔñDB1 µ½±íµÄÁбíÄÇÀï
Ñ¡Ôñtb1±í ÓÒ¼ü ËùÓÐÈÎÎñ Êý¾Ýµ¼³ö
ÏÂÒ»²½  Ñ¡ÔñÄãÒªµ¼³öµÄÊý¾Ý¿âDB1  ÏÂÒ»²½ Ñ¡ÔñÄãÒªµ¼ÈëµÄÊý¾Ý¿âDB2
ÏÂÒ»²½  Ñ¡ÔñÄãÒªµ¼µÄ±í£¨Ç°Ãæ»­¹´£©tb1£¬ ºóÃæ¶ÔÓ¦µÄÊÇÐÂÊý¾Ý¿âµÄ±íÃûtb2£¨Ä¬ÈÏÊÇÏàͬ±íÃû£¬¿ÉÐ޸ģ© ÏÂÒ»²½ ÍêÁË ......

¼Ç¼һЩsqlÓï¾äoracleµÄ

 select d.code,d.name, sum(w.weight) weight,round(avg(w.price),2) price,sum(w.money) money
from weight_info w left outer join t_dict d on w.productcode=d.code left outer  join t_balancecode b on w.balancecode=b.balancecode where 1=1 and w.operdate>TO_TIMESTAMP('2009-11-2 04:12:32.0', ' ......

Windows Mobile 6.0Á¬½ÓSQL Server 2005(PC°æ)


»·¾³´î½¨£º
   windows MobileµÄ¿ª·¢»·¾³µÄ´î½¨ÕâÀï¾Í²»ËµÁË£¬²»Ã÷°×µÄÅóÓÑÔÚÍøÉÏËÑϼ´¿É¡£
²½Öè¸ÅÊö:
1£ºPCÉϵÄSQL SERVER ÐèÒª¿ªÆôÔ¶³ÌÁ¬½Ó¡£
2£ºMoblieÄ£ÄâÆ÷ÐèҪͨ¹ýActiveSyncÁ¬½Ó£¬Ê¹ÆäÄܹ»Í¨¹ýPCÁ¬Íø¡£(Èç¹ûÊÇÊÖ»úµÄ»°£¬ÐèÒªÄܹ»Í¨¹ýÎÞÏßÍøÂçÁ¬È뻥ÁªÍø)
Ïêϸ˵Ã÷£º
1:SQL Server 2005¿ªÆôÔ¶³ÌÁ¬ ......

SQL ServerËÀËø×ܽá

1.
ËÀËøÔ­Àí
   
¸ù¾Ý²Ù×÷ϵͳÖеĶ¨Ò壺ËÀËøÊÇÖ¸ÔÚÒ»×é½ø³ÌÖеĸ÷¸ö½ø³Ì¾ùÕ¼Óв»»áÊͷŵÄ×ÊÔ´£¬µ«Òò»¥ÏàÉêÇë±»ÆäËû½ø³ÌËùÕ¾Óò»»áÊͷŵÄ×ÊÔ´¶ø´¦ÓÚµÄÒ»ÖÖÓÀ¾ÃµÈ´ý״̬¡£
   
ËÀËøµÄËĸö±ØÒªÌõ¼þ£º
»¥³âÌõ¼þ
(Mutual exclusion)
£º×ÊÔ´²»Äܱ»¹²Ïí£¬Ö»ÄÜÓÉÒ»¸ö½ø³ÌʹÓá£
ÇëÇóÓë± ......

SqlDbType ö¾ÙÓë Microsoft SQL Server Êý¾ÝÀàÐÍ

 
 ³ÉÔ±Ãû³Æ˵Ã÷
BigInt
Int64¡£64 λµÄÓзûºÅÕûÊý¡£ 
Binary
Byte ÀàÐ굀 Array¡£¶þ½øÖÆÊý¾ÝµÄ¹Ì¶¨³¤¶ÈÁ÷£¬·¶Î§ÔÚ 1 µ½ 8,000 ¸ö×Ö½ÚÖ®¼ä¡£ 
Bit
Boolean¡£ÎÞ·ûºÅÊýÖµ£¬¿ÉÒÔÊÇ 0¡¢1 »ò ¿ÕÒýÓã¨ÔÚ Visual Basic ÖÐΪ Nothing£©¡£ 
Char
String¡£·Ç Unicode ×Ö·ûµÄ¹Ì¶¨³¤¶ÈÁ÷£¬·¶Î§ÔÚ 1 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ