SQL ÿ¸ö·ÖÀà¸÷È¡2ÌõÊý¾Ý
create table tb (ptoid int,proclassid int,proname varchar(10))
insert tb
select 1,1,'Ò·þ1'
union all
select 2,2,'Ò·þ2'
union all
select 3,3,'Ò·þ3'
union all
select 4,3,'Ò·þ4'
union all
select 5,2,'Ò·þ5'
union all
select 6,2,'Ò·þ6'
union all
select 7,2,'Ò·þ7'
union all
select 8,1,'Ò·þ8'
select * from tb
ptoid proclassid proname
----------- ----------- ----------
1 1 Ò·þ1
2 2 Ò·þ2
3 3 Ò·þ3
4 3 Ò·þ4
5 2 Ò·þ5
6 2 Ò·þ6
7 2 Ò·þ7
8 1 Ò·þ8
£¨ËùÓ°ÏìµÄÐÐÊýΪ 8 ÐУ©
select * from tb a where
(select count(*) from tb b where b.proclassid=a.proclassid and b.ptoid>a.ptoid) <2
order by proclassid
ptoid proclassid proname
----------- ----------- ----------
1 1 Ò·þ1
8 1  
Ïà¹ØÎĵµ£º
ÏÂÃæÊÇÖ¸µ¼Îĵµ¡£Çë¸ú×ÅÒ»²½²½µÄ×ö¡£¾ÍÄܳɹ¦Á¬½ÓÉÏsql server 2008
javaÖÐÁ¬½Ósql server 2008µÄ×¢ÒâÊÂÏ
2000£¬2005µÄÊý¾Ý¿âÇý¶¯ÀàµÄд·¨ÊÇ£º
com.microsoft.jdbc.sqlserver.SQLServerDriver
URLµÄд·¨ÊÇ£º¼ÙÉèÊý¾Ý¿âÊÇnews
jdbc:microsoft:sqlserver://localhost:1433;databaseName=news
µ«ÊÇ20 ......
--A. ´Ó´æ´¢ÔÚ·ÇÀàÐÍ»¯µÄ xml ±äÁ¿ÖеÄÎĵµÖÐɾ³ý½Úµã
DECLARE @myDoc xml
SET @myDoc = '<?Instructions for=TheWC.exe ?>
<Root>
<!-- instructions for the 1st work center -->
<Location LocationID="10" LaborHours="1.1" MachineHours=".2" >
Some text 1
<st ......
SQL server°²×°Ê±±¨¹ÒÆð´íÎó
SQL server°²×°Ê±Ê±£º¡°ÒÔǰµÄij¸ö³ÌÐò°²×°ÒÑÔÚ°²×°¼ÆËã»úÉÏ´´½¨¹ÒÆðµÄÎļþ²Ù×÷¡£ÔËÐа²×°³ÌÐò֮ǰ±ØÐëÖØÐÂÆô¶¯¼ÆËã»ú¡±´íÎó¡£ ´ò¿ª×¢²á±í±à¼Æ÷£¨¿ªÊ¼->ÔËÐÐ->regedit£©£¬ÔÚHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session ManagerÖÐÕÒµ½PendingFileRenameOperationsÏîÄ¿£¬²¢É¾ ......
SQL Server 2005 ²»ÔÊÐíÔ¶³ÌÁ¬½Ó½â¾ö·½·¨
¸Õ¸Õ°²×°µÄÊý¾Ý¿âϵͳ£¬°´ÕÕĬÈϰ²×°µÄ»°£¬ºÜ¿ÉÄÜÔÚ½øÐÐÔ¶³ÌÁ¬½Óʱ±¨´í£¬Í¨³£ÊÇ´íÎó:"ÔÚÁ¬½Óµ½ SQL Server 2005 ʱ£¬
ÔÚĬÈϵÄÉèÖÃÏ SQL Server ²»ÔÊÐí½øÐÐÔ¶³ÌÁ¬½Ó¿ÉÄܻᵼÖ´Ëʧ°Ü¡£
(provider: ÃüÃû¹ÜµÀÌṩ³ÌÐò, error: 40 - ÎÞ·¨´ò¿ªµ½ SQL Server µÄÁ¬½Ó) "ËÑM ......
1: ɾ³ýLOG (ɾ³ýlogÎļþ£¬¸½¼Óʱ×Ô¶¯Öؽ¨logÎļþ£¬ÒÔ´Ë·½Ê½À´Çå¿ÕÈÕÖ¾)
1) ·ÖÀëÊý¾Ý¿â ÆóÒµ¹ÜÀíÆ÷££¾·þÎñÆ÷££¾Êý¾Ý¿â££¾ÓÒ¼ü££¾·ÖÀëÊý¾Ý¿â
2) ɾ³ýLOGÎļþ
3) ¸½¼ÓÊý¾Ý¿â ÆóÒµ¹ÜÀíÆ÷££¾·þÎñÆ÷££¾Êý¾Ý¿â££¾ÓÒ¼ü££¾¸½¼ÓÊý¾Ý¿â
´Ë·¨Éú³ ......