ÇómssqlºÍorcalÁ½ÌõÓï¾ä - MS-SQL Server / ÒÉÄÑÎÊÌâ
SQL code:
sql2005£¬sql2008
SELECT
±íÃû=CASE WHEN a.colorder = 1 THEN d.name ELSE '' END,
±í˵Ã÷=CASE WHEN a.colorder = 1 THEN isnull(f.value, '') ELSE '' END ,
×Ö¶ÎÐòºÅ=a.colorder ,
×Ö¶ÎÃû=a.name ,
±êʶ=CASE WHEN COLUMNPROPERTY(a.id, a.name, 'IsIdentity') = 1 THEN '¡Ì' ELSE '' END ,
Ö÷¼ü=CASE WHEN EXISTS (SELECT 1 from dbo.sysindexes si INNER JOIN
dbo.sysindexkeys sik ON si.id = sik.id AND si.indid = sik.indid INNER JOIN
dbo.syscolumns sc ON sc.id = sik.id AND sc.colid = sik.colid INNER JOIN
dbo.sysobjects so ON so.name = so.name AND so.xtype = 'PK'
WHERE sc.id = a.id AND sc.colid = a.colid) THEN '¡Ì' ELSE '' END ,
ÀàÐÍ=b.name ,
³¤¶È=a.length ,
¾«¶È=COLUMNPROPERTY(a.id, a.name, 'PRECISION') ,
СÊýλÊý=ISNULL(COLUMNPROPERTY(a.id, a.name, 'Scale'), 0) ,
ÔÊÐí¿Õ=CASE WHEN a.isnullable = 1 THEN '¡Ì' ELSE '' END ,
ĬÈÏÖµ= ISNULL(e.text, ''),
×Ö¶Î˵Ã÷=ISNULL(g.[value], ''),
´´½¨Ê±¼ä=d.crdate,
¸ü¸Äʱ¼ä=CASE WHEN a.colorder = 1 THEN d.refdate ELSE NULL END
from dbo.syscolumns a LEFT OUTER JOIN
dbo.systypes b ON a.xtype = b.xusertype INNER JOIN
dbo.sysobjects d ON a.id = d.id AND d.xtype = 'U' AND
d.status >= 0 LEFT OUTER JOIN
dbo.syscomments e ON a.cdefault = e.id LEFT OUTER JOIN
sys.extended_properties g ON a.id = g.major_id
Ïà¹ØÎÊ´ð£º
ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд
ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......
½ñÌì×öÁËÒ»¸ö´æ´¢¹ý³Ì »·¾³ÊÇSQL2000Êý¾Ý¿â
´óÖÂÈçÏÂ
½¨Á¢ÁÙʱ±í
¶¨ÒåÔ±¹¤Óαê
Ñ»·Ô±¹¤£¨ÊôÓÚ1¸ö¹«Ë¾)
......
´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽ
XML code:
<folder state="unchecked" label="È«²¿">
¡¡¡¡ <folder state="unchecked&qu ......
sqlµÄÈí¼þÔÚÄÄÀï¿ÉÒÔÏ°¡£¡ÔÚÍøÉÏÕÒÁËÂù¶à¶¼Óò»ÁË°¡
Ëæ±ã¸ãÒ»D°æ°É£¬
ѸÀ×µÚÒ»¸ö¾Í¿ÉÒÔÓÃ
2000,2005¶¼ÕâÑù
http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......
select count(1) from FX_RETURNBOOKCHECKLIST fxreturnbo0_ where fxreturnbo0_.BOOKID='164 ' AND fxreturnbo0_.RETURNID='00025.S0000001'
ÉÏÃæÒ»¸ö¼òµ¥µÄSQL,Ö´ÐÐʱ¼ä2.6à ......