SQLÓï¾äµÃµ½´æ´¢¹ý³Ì¹ØÁªÄÄЩ±íÃû
##################################################
# ÉùÃ÷£º
# ±¾ÎÄת×ÔCSDN£¬Óû§ID£ºhtl258
# ÔÌûµØÖ·£ºhttp://blog.csdn.net/htl258/archive/2010/05/12/5582744.aspx
##################################################
SELECT DISTINCT '['+user_name(b.uid)+'].['+b.name+']' AS ¶ÔÏóÃû,b.type AS ÀàÐÍ
from sysdepends a,sysobjects b
WHERE b.id=a.depid
AND a.id=OBJECT_ID('¹ý³ÌÃû');
EXEC SP_DEPENDS '¹ý³ÌÃû';
Ïà¹ØÎĵµ£º
´íÎó´¦Àí
ÔÚSQL Server2000ÖгöÏֵĴíÎó¾ßÓÐÒÔϼ¸¸öÌص㣺
´íÎóºÅ£ºÃ¿¸ö´íÎó״̬¶¼¶ÔӦΨһµÄ´íÎóºÅ¡£
´íÎóÐÅÏ¢×Ö·û´®£º´íÎóÐÅÏ¢ÌṩÁËÓйشíÎóÔÒòµÄÕï¶ÏÐÅÏ¢¡£Ðí¶à´íÎóÐÅÏ¢¶¼ÓÐÌæ»»±äÁ¿£¬ÆäÖаüº¬Ò»Ð©ÐÅÏ¢£¬Èç²úÉú´íÎóµÄ¶ÔÏóÃû³Æ¡£Ã¿¸ö´íÎóºÅ¶¼¶ÔӦΨһµÄ´íÎóÐÅÏ¢¡£
ÑÏÖضȣºÑÏÖضȱíʾ´íÎóµÄÑÏÖس̶ȡ£ ......
1. Ñ¡ÓÃÊʺϵÄORACLEÓÅ»¯Æ÷
ORACLEµÄÓÅ»¯Æ÷¹²ÓÐ3ÖÖ:
a. RULE (»ùÓÚ¹æÔò) b. COST (»ùÓڳɱ¾) c. CHOOSE (Ñ¡ÔñÐÔ)
ÉèÖÃȱʡµÄÓÅ»¯Æ÷,¿ÉÒÔͨ¹ý¶Ôinit.oraÎļþÖÐOPTIMIZER_MODE²ÎÊýµÄ¸÷ÖÖÉùÃ÷,ÈçRULE,COST,CHOOSE,ALL_ROWS,FIRST_ROWS . Ä㵱ȻҲÔÚSQL¾ä¼ ......
sqlͳ¼Æ£¹ØÓÚѧÉú³É¼¨(´ð°¸)
http://blog.sina.com.cn/s/blog_61380b320100ej9p.html
´ð°¸£º
1. ¼ÆËãÿ¸öÈ˵Ä×ܳɼ¨²¢ÅÅÃû
select name,sum(score) as allscore from stuscore group by name order by allscore
2. &nbs ......
¼Ó[ ]ÓÃÓÚ¶¨½çÁÐÃû»ò±íÃûµÈÐÅÏ¢£¬ÒÔÇø±ðһЩÌØÊâµÄ²»ºÏÃüÃû¹æÔòµÄ×Ö´®£¬»òÊÇÓëϵͳ±£Áô×ÖÓгåÍ»¡£
Èç"user"ÊÇSQL Server±£ÁôµÄ¹Ø¼ü×Ö£¬ËùÒÔÓÃ"select * from user"²éѯ»áÌáʾÓï·¨´íÎó¡£¼ÓÉÏÖÐÀ¨ºÅ£¬ÒÔÉùÃ÷Æä²»ÊDZ£Áô×Ö¡£
"select * from [user]"
Èç¹û±íÃû²»Êǹؼü×Ö£¬ÈçCompany£¬ÔòÓÃ"select * from Company"ÊÇûÎÊÌâµ ......