sql Áгö¿âÖÐËùÓÐ±í¼°×Ö¶ÎÏêϸÐÅÏ¢
--select name from sysobjects where type='U' order by name
SELECT
(case when a.colorder=1 then d.name else '' end) ±íÃû,
-- a.colorder ×Ö¶ÎÐòºÅ,
a.name ×Ö¶ÎÃû,
(case when COLUMNPROPERTY( a.id,a.name,'IsIdentity')=1 then '√'else '' end) ±êʶ,
(case when (SELECT count(*)
from sysobjects
WHERE (name in (SELECT name
from sysindexes
WHERE (id = a.id) AND (indid in (SELECT indid
from sysindexkeys
WHERE (id = a.id) AND (colid in (SELECT colid
from syscolumns
WHERE (id = a.id) AND (name = a.name)
)
)
)
)
)
) AND (xtype = 'PK')
) > 0 then '√' else '' end) Ö÷¼ü,
b.name ÀàÐÍ,
--a.length Õ¼ÓÃ×Ö½ÚÊý,
COLUMNPROPERTY(a.id,a.name,'PRECISION') as ³¤¶È,
--isnull(COLUMNPROPERTY(a.id,a.name,'Scale'),0) as СÊýλÊý,
(case when a.isnullable=1 then '√'else '' end) ÔÊÐí¿Õ,
isnull(e.text,'') ĬÈÏÖµ
--isnull(g.[value],'') AS ×Ö¶Î˵Ã÷
from syscolumns a
left join systypes b on a.xtype=b.xusertype
inner join sysobjects d on a.id=d.id and d.xtype='U' and d.name<>'dtproperties'
left join syscomments e on a.cdefault=e.id
--left join sysproperties g on a.id=g.id AND a.colid = g.sma
Ïà¹ØÎĵµ£º
×òÍí£¬µ½Î¢Èí¹Ù·½ÏÂÁËÒ»¸ö32°æ±¾µÄTrial°æ±¾¡£ÎļþÃûΪSQLFULL_x86_ENU.exe¡£Îļþ´óСΪ1.30G×óÓÒ¡£ÒòΪֻÓÐ32λһ¸ö°æ
±¾£¬±ÈSQL Server 2008ÄǸö3GµÄҪС¶àÁË¡£ºÇºÇ¡£
http://www.microsoft.com/sqlserver/2008/en/us/R2Downloads.aspx
ÏÂ
ÔØÍê³Éºó£¬ÏÈжÔØÔÀ´µÄSQL Server 2008¡¡sp2,½á¹ûÕûÕûÔËÐÐÁËÁ½¸ ......
SQLÌṩÁËËÄÖÖÄ£ºýÆ¥Å䷽ʽ
1£¬%£º±íʾÈÎÒâ0¸ö»ò¶à¸ö×Ö·û¡£¿ÉÆ¥ÅäÈÎÒâÀàÐͺͳ¤¶ÈµÄ×Ö·û£¬ÓÐЩÇé¿öÏÂÈôÊÇÖÐÎÄ£¬ÇëÔËÓÃÁ½¸ö°Ù·ÖºÅ£¨%%£©±íʾ¡£
±ÈÈç SELECT * from [user] WHERE u_name LIKE '%Èý%'
½«»á°Ñu_nameΪ“ÕÅÈý”£¬“ÕÅèÈý”¡¢“Èý½Å蔣¬“ÌÆÈý²Ø”µÈµÈÓГÈý& ......
1¡¢±à³ÌÓïÑÔÓëOracleÊý¾Ý¿â
1.1¡¢´æ´¢µÄÓëÄäÃûµÄPL/SQL³ÌÐò¿é
Óë´æ´¢µÄPL/SQL³ÌÐò¿éÏà±È£¬ÄäÃûµÄPL/SQL³ÌÐò¿éЧÂʽϵͣ¬´ËÍâÓÉÓÚ¿ÉÄÜÔÚ¶ą̀»úÆ÷Öй«²¼Ô´´úÂ룬»¹»áÒý·¢¹ÜÀíÎÊÌâ¡£
1.2¡¢PL/SQL¶ÔÏó
PL/SQL¶ÔÏó¾ßÓÐÏÂÁÐ5ÖÖÀàÐÍ£º
¹ý³Ì
º¯Êý
³ÌÐò°ü
³ÌÐò°üÖ÷Ìå
´¥·¢Æ÷
2¡¢¹ý³Ì¡¢º¯ÊýÒÔ¼°³ÌÐò°ü
2.1¡¢¹ý³ÌÓëº¯Ê ......
SQL Server 2005 ºÍ2008ÌṩÁ˺ܶàеĺÍÔöÇ¿µÄÉÌÎñÖÇÄܹ¦ÄÜ,°üÀ¨ÀûÓü¯³É·þÎñ(SSIS)ÕûºÏ¶àÖÖÊý¾ÝÔ´;ÀûÓ÷ÖÎö·þÎñ(SSAS)ʹÊý¾ÝÄÚÈݸü·á¸»²¢ÇÒ½¨Á¢¸´ÔÓµÄÉÌÒµ·ÖÎö; ÒÔ¼°ÀûÓñ¨±í·þÎñ(SSRS)±à¼,¹ÜÀí,ºÍÌá½»·á¸»µÄ±¨±í. Èç¹ûÄãÏÖÔÚ»¹²»Çå³þÕâЩ¹¦ÄÜ,ÄÇô½ÓÏÂÀ´Ò»ÏµÁеĽéÉÜ»áÈÃÄã¶ÔSQL ServerÏÖÔÚµÄÉÌÎñÖÇÄÜÖ§³Ö´ó³ÔÒ»¾ª.²»¹ý ......
[MySQLÓÅ»¯] -- ÈçºÎ²éÕÒSQLЧÂʵØϵÄÔÒò
ʱ¼ä:2010-2-28À´Ô´:HaCMS¿ªÔ´ÉçÇø ×÷Õß:chusong
²éѯµ½Ð§ÂÊµÍµÄ SQL Óï¾ä ºó£¬¿ÉÒÔͨ¹ý EXPLAIN »òÕß DESC ÃüÁî»ñÈ¡ MySQL ÈçºÎÖ´ÐÐ SELECT Óï¾äµÄÐÅÏ¢£¬°üÀ¨ÔÚ SELECT Óï¾äÖ´Ðйý³ÌÖбíÈçºÎÁ¬½ÓºÍÁ¬½ÓµÄ˳Ðò£¬±ÈÈçÎÒÃÇÏë¼ÆËã 2006 ÄêËùÓй«Ë¾µÄÏúÊ۶ÐèÒª¹ØÁª sales ......