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

mssqlº¯Êý·­Òë - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql

¹òÇó½«ÒÔϺ¯Êý·­ÒëΪ mysql µÄÓï·¨


CREATE FUNCTION workdayadd( 
@date datetime, --»ù´¡ÈÕÆÚ 
@workday int --ÒªÔö¼ÓµÄ¹¤×÷ÈÕÊý 
)RETURNS datetime 
AS 
BEGIN 
DECLARE @bz int 
--Ôö¼ÓÕûÖܵÄÌìÊý 
SELECT @bz=CASE WHEN @workday<0 THEN -1 ELSE 1 END 
,@date=DATEADD(Week,@workday/5,@date) 
,@workday=@workday%5 
--Ôö¼Ó²»ÊÇÕûÖܵŤ×÷ÌìÊý 
WHILE @workday<>0 
SELECT @date=DATEADD(Day,@bz,@date), 
@workday=CASE WHEN (@@DATEFIRST+DATEPART(Weekday,@date)-1)%7 BETWEEN 1 AND 5 
THEN @workday-@bz ELSE @workday END 
--±ÜÃâ´¦ÀíºóµÄÈÕÆÚÍ£ÁôÔڷǹ¤×÷ÈÕÉÏ 
WHILE (@@DATEFIRST+DATEPART(Weekday,@date)-1)%7 in(0,6) 
SET @date=DATEADD(Day,@bz,@date) 
RETURN(@date) 
END
ÔÚÏߵȸßÊÖ


»ØÂ¥ÉÏ

ÒÔÉϺ¯Êý¹¦ÄÜÀýÈ磺¡°workdayadd('2009-10-01',3)¡±
·µ»Ø2009-10-01Ö®ºó3¸ö¹¤×÷ÈÕµÄÈÕÆÚ£¬µÚ¶þ¸ö²ÎÊýÒ²¿ÉÒÔÓøºÖµ£¬Í¬ÀíµÃµ½Ö®Ç°3¸ö¹¤×÷ÈÕµÄÈÕÆÚ

ÌÞ³ýÖÜÄ©ÓõÄ

ÒýÓ÷µ»Ø2009-10-01Ö®ºó3¸ö¹¤×÷ÈÕµÄÈÕÆÚ
¾ßÌåÊÇʲôÈÕÆÚ£¿ ÁíÍ⽨Òé¶à¸ø¼¸¸ö²âÊÔÓÃÈÕÆÚ¡£

ÊÇÕâÑùµÄ£º
  ±ÈÈ磺workdayadd('2010-05-06',3£© ·µ»Ø£º2010-05-11
  workdayadd('2010-05-06',-3£© ·µ»Ø£º2010-05-03
  workdayadd('2010-05-06',-8£© ·µ»Ø£º2010-04-26
  workdayadd('2010-05-06',8£©


Ïà¹ØÎÊ´ð£º

ÈçºÎ¶¨ÆÚɾ³ýmysqlÊý¾Ý - PHP / »ù´¡±à³Ì

ÇëÎÊÏÂÄܲ»ÄÜÔÙwindows϶¨ÆÚÇå¿ÕmysqlÒ»¸ö±íÖеÄÈ«²¿Êý¾Ý£¬ÓÃPHPʵÏÖ£¡
лл¸÷λÁË
¾Í±ÈÈçÒ»¸öÐÇÆÚÇå¿ÕÒ»´Î
±ÈÈçÿ¸öÐÇÆÚÁùÁãµãÇå¿ÕÒ»´Î£¡
ллÁË

¼Æ»®ÈÎÎñ...php....sql...truncate....OK

Äã¾ÍÕâ½ÓÔÚҳà ......

ÈçºÎʹÓÃMySQL - MS-SQL Server / »ù´¡Àà

¸Õ¸Õ½Ó´¥MySQL,²»ÖªµÀ¸ÃÈçºÎÈ¥²é¿´Êý¾Ý£¬²åÈëÊý¾Ý£¬´´½¨Êý¾Ý¿â¡¢±í£¬ÓÃÄÄΪǰ±²ÄÜÖ¸½ÌÒ»¶þ£¿

MySQL 5.1²Î¿¼ÊÖ²á

ÒýÓÃ
ÐÖµÜÄã»á½áÌùÂð£¿
mysql ²Î¿¼ÊÖ²á

baidu

MySQL¹Ù·½Îĵµ http://dev.mysql.com/doc ......

PHP+MYSQLÊý¾Ý¼¯´¦Àí - PHP / »ù´¡±à³Ì

1¡¢ÊDz»ÊÇPHPÖÐÖ»ÄÜʹÓÃmysql_query("update user_aa set money=money2-".$bpanmm." where uid=".$userppp);¸üÐÂÊý¾Ý£¿£¿£¿
2¡¢PHP¸üÐÂmysql_fetch_row($res)Óëmysql_fetch_array($res)ÖеÄÊý¾ ......

mysqlÍâ¼ü - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql

ÎÒÓõÄÊÇmysql6.0Ϊʲôһ´´½¨Á½¸ö±íÕâ¼äÓÃÍâ¼üÀ´Á¬½Óʱ¾Í˵´´½¨²»ÁË£ºcan"nt create table ...
ÄãµÄÓï¾äÊÇʲô£¿ÄãµÄ±íÊÇʲô´æ´¢ÒýÇ棿 Èç¹ûÊÇmyisam Ôò²»Ö§³ÖÍâ¼ü£¬ÄãÐèÒª°Ñ±í¸ÄΪinndb

貼³öSQL&# ......

mysqlÇøû¸ßÊÖ - MS-SQL Server / »ù´¡Àà

ÎÒ¾õµÃmysqlºÍsqlserverÓй²Í¬µÄµØ·½£º
ÓиöÎÊÌâÊǹØÓÚ±íµÄËøÎÊÌ⣺
½ø³ÌA ½ø³ÌB
select * from user where id in lock share mode£¨¹²ÏíËø)
&nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ