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

Ãû´ÎËã·¨(sql server)(ת×Ô£º°®Ð¾õÂÞ.ع»ª)

±íjh03ÓÐÏÂÁÐÊý¾Ý£º
name¡¡score
aa¡¡¡¡99
bb¡¡¡¡56
cc¡¡¡¡56
dd¡¡¡¡77
ee¡¡¡¡78
ff¡¡¡¡76
gg¡¡¡¡78
ff¡¡¡¡50
1. Ãû´ÎÉú³É·½Ê½1,ScoreÖظ´Ê±ºÏ²¢Ãû´Î
SELECT *¡¡,¡¡Place=(SELECT COUNT(DISTINCT Score) from jh03 WHERE Score >= a.Score)
from jh03 a
ORDER BY Place
½á¹û
Name Score Place
---------------- ----------------- -----------
aa 99.00 1
ee 78.00 2
gg 78.00 2
dd 77.00 3
ff 76.00 4
bb 56.00 5
cc 56.00 5
ff 50.00 6
2. Ãû´ÎÉú³É·½Ê½2 , ScoreÖظ´Ê±±£ÁôÃû´Î¿Õȱ
SELECT * , Place=(SELECT COUNT(Score) from jh03 WHERE Score > a.Score) + 1
from jh03 a
ORDER BY Place
½á¹û
Name Score Place
--------------- ----------------- -----------
aa 99.00 1
ee 78.00 2
gg 78.00 2
dd 77.00 4
ff 76.00 5
bb 56.00 6
cc 56.00 6
ff 50.00 8


Ïà¹ØÎĵµ£º

SQL SERVER³£ÓÃÈÕÆÚº¯Êý


1.Ò»¸öÔµÚÒ»ÌìµÄ
Select DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)
2.±¾ÖܵÄÐÇÆÚÒ»
Select DATEADD(wk, DATEDIFF(wk,0,getdate()), 0)
3.Ò»ÄêµÄµÚÒ»Ìì
Select DATEADD(yy, DATEDIFF(yy,0,getdate()), 0)
4.¼¾¶ÈµÄµÚÒ»Ìì
Select DATEADD(qq, DATEDIFF(qq,0,getdate()), 0)
5.µ±ÌìµÄ°ëÒ¹
Select DATEADD(dd, DAT ......

SQL plus³£ÓÃÃüÁî

1.µÇ½ϵͳÓû§
sqlplus È»ºóÊäÈëϵͳÓû§ÃûºÍÃÜÂë
µÇ½±ðµÄÓû§
conn Óû§Ãû/ÃÜÂë;
2.´´½¨±í¿Õ¼ä
create tablespace ¿Õ¼äÃû
datafile 'c:"¿Õ¼äÃû' size 15M --±í¿Õ¼äµÄ´æ·Å·¾¶,³õʼֵΪ15M
autoExtend on next 10M --¿Õ¼äµÄ×Ô¶¯Ôö³¤µÄÖµÊÇ10M
permanent online; --ÓÀ¾ÃʹÓÃ
3.´´½¨Óû§
create user s ......

SQL Server²éѯһÕűíµÄËùÓÐ×Ö¶Î

SQL Server²éѯһÕűíµÄËùÓÐ×ֶΣº
http://hi.baidu.com/samxx8/blog/item/7048f8de1725835894ee37b4.html
SELECT c.name,o.name from syscolumns AS c
INNER JOIN sysobjects AS o
ON c.id = o.id where o.name='SPF_Users' ......

±£»¤SQL ServerÊý¾Ý¿âµÄÊ®´ó¾øÕÐ

±£»¤SQL ServerÊý¾Ý¿âµÄÊ®´ó¾øÕÐ
http://blog.csdn.net/cncco/archive/2007/09/15/1785880.aspx
1. °²×°×îеķþÎñ°ü
ΪÁËÌá¸ß·þÎñÆ÷°²È«ÐÔ£¬×îÓÐЧµÄÒ»¸ö·½·¨¾ÍÊÇÉý¼¶µ½SQL Server 2000 Service Pack 3a (SP3a)¡£ÁíÍ⣬Äú»¹Ó¦¸Ã°²×°ËùÓÐÒÑ·¢²¼µÄ°²È«¸üС£
2. ʹÓÃMicrosoft»ùÏß°²È«ÐÔ·ÖÎöÆ÷£¨MBSA£©À´ÆÀ¹À·þÎñÆ÷µÄ°² ......

VB+SQL 2000 ʵÏÖÊý¾Ý¿âµÄ±¸·ÝºÍ»Ö¸´

 
'*************************************************************************
'**Ä£ ¿é Ãû£ºfBackupDatabase_a
'**Ãè    Êö£º±¸·ÝÊý¾Ý¿â,·µ»Ø³ö´íÐÅÏ¢,Õý³£»Ö¸´,·µ»Ø""
'**µ÷    ÓãºfBackupDatabase_a "±¸·ÝÎļþÃû","Êý¾Ý¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ