SQL¸ù¾ÝÒÑÖªµÄÄêÔÂ,¼ÆËã¸ÃÔµÄÌìÊý.
±¾ÎÄÊÇÒ»¸ö¼¼ÇÉÎÄÕÂ,½éÉÜSQL¸ù¾ÝÒÑÖªµÄÄêÔÂ,¼ÆËã¸ÃÔµÄÌìÊý.
±¾ÎÄÊÇÒ»¸ö¼¼ÇÉÎÄÕÂ,½éÉÜSQL¸ù¾ÝÒÑÖªµÄÄêÔÂ,¼ÆËã¸ÃÔµÄÌìÊý.
declare @iDays int
declare @dt varchar(50)
set @dt=@Year+'-'+@Month+'-01'
select @iDays=day(dateadd(d,-Day(dateadd(m,1,convert(datetime,@dt))),dateadd(m,1,convert(datetime,@dt))))
print @idays
Ïà¹ØÎĵµ£º
Microsoft SQL Server ±í²»Ó¦¸Ã°üº¬Öظ´ÐкͷÇΨһÖ÷¼ü¡£Îª¼ò½àÆð¼û£¬ÔÚ±¾ÎÄÖÐÎÒÃÇÓÐʱ³ÆÖ÷¼üΪ“¼ü”»ò“PK”£¬µ«ÕâʼÖÕ±íʾ“Ö÷¼ü”¡£Öظ´µÄ PK Î¥·´ÁËʵÌåÍêÕûÐÔ£¬ÔÚ¹ØϵϵͳÖÐÊDz»ÔÊÐíµÄ¡£SQL Server Óи÷ÖÖÇ¿ÖÆÖ´ÐÐʵÌåÍêÕûÐԵĻúÖÆ£¬°üÀ¨Ë÷Òý¡¢Î¨Ò»Ô¼Êø¡¢Ö÷¼üÔ¼Êøº ......
--ºÏ²¢Öظ´ÐÐ
select * from A
union
select * from B
--²»ºÏ²¢Öظ´ÐÐ
select * from A
union all
select * from B
°´Ä³¸ö×Ö¶ÎÅÅÐò
--ºÏ²¢Öظ´ÐÐ
select *
from (
select * from A
union
select * from B) AS T
order by ×Ö¶ÎÃû
--²»ºÏ²¢Öظ´ÐÐ
select *
from (
select * from A
union all
select * ......
´ó¼ÒºÃ£¡×î½üÓÖÓÐÁËһЩģ¿éÓ÷¨µÄÐĵã¬ÄǾÍÊÇÀûÓÃÄ£¿éʹÄãµÄÄÚ´æ±ä³ÉÒ»¸öÐéÄâµÄÊý¾Ý¿âģʽ£¬Ê¹Äã¿ÉÒÔÔÚûÓÐÊý¾Ý¿âµÄÇé¿öÏ£¬½«txtÎļþµÄÊý¾Ý½øÐÐ sqlÓï¾ä´¦Àí£¬¸Ð¾õºÜÐÂÏÊ°É£¬²»¹ýÕâ¸ö²»Óøе½¾ªÑÈ£¬PerlÒ»Ö±ÊǺÜÍêÃÀµÄ£¬¹þ¹þ£¬ÄÇÎÒÃǾÍÀ´¿´¿´Õâ¸öÉñÆæ°É£¡
ÐèÒª°²×° Ä£¿é£º
SQl::Library;
DBI
ÏÂÃæÊdzÌÐò ......
SQL Server 2000µÄ°²È«ÅäÖÃÔÚ½øÐÐSQL Server 2000Êý¾Ý¿âµÄ°²È«ÅäÖÃ֮ǰ£¬Ê×ÏȱØÐë¶Ô²Ù×÷ϵͳ½øÐа²È«ÅäÖ㬱£Ö¤²Ù×÷ϵͳ´¦ÓÚ°²È«×´Ì¬¡£È»ºó¶ÔҪʹÓõIJÙ×÷Êý¾Ý¿âÈí¼þ(³ÌÐò)½øÐбØÒªµÄ°²È«ÉóºË£¬±ÈÈç¶ÔASP¡¢PHPµÈ½Å±¾£¬ÕâÊǺܶà»ùÓÚÊý¾Ý¿âµÄWebÓ¦Óó£³öÏֵݲȫÒþ»¼£¬¶ÔÓڽű¾Ö÷ÒªÊÇÒ»¸ö¹ýÂËÎÊÌ⣬ÐèÒª¹ýÂËһЩÀàËÆ&ld ......