¼òµ¥µÄ3¸öSQLÊÓͼ¸ã¶¨ËùÓÐSqlServerÊý¾Ý¿â×Öµä ת
Êý¾Ý¿â×Öµä°üÀ¨±í½á¹¹(·Ö2KºÍ2005£©¡¢Ë÷ÒýºÍÖ÷¼ü.Íâ¼ü.Ô¼Êø.ÊÓͼ.º¯Êý.´æ´¢¹ý³Ì.´¥·¢Æ÷.¹æÔò¡£¿ÉÒÔÔÚÆóÒµ¹ÜÀíÆ÷¡¢²éѯ·ÖÎöÆ÷Öмòµ¥Ö´ÐУ¬Ö±½ÓÁ˵±µÄ²é³öSQL2K¼°SQL2005µÄËùÓÐÊý¾Ý×ֵ䣬·½±ãÎĵµµÄ±àд£¬Ï£Íû¶Ô´ó¼ÒÓаïÖú¡£
1. SqlServer2000Êý¾Ý¿â×Öµä--±í½á¹¹.sql
SELECT TOP 100 PERCENT --a.id,
CASE WHEN a.colorder = 1 THEN d.name ELSE '' END AS ±íÃû,
CASE WHEN a.colorder = 1 THEN isnull(f.value, '') ELSE '' END AS ±í˵Ã÷,
a.colorder AS ×Ö¶ÎÐòºÅ, a.name AS ×Ö¶ÎÃû, CASE WHEN COLUMNPROPERTY(a.id,
a.name, 'IsIdentity') = 1 THEN '√' ELSE '' END AS ±êʶ,
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 = si.name AND so.xtype = 'PK'
WHERE sc.id = a.id AND sc.colid = a.colid) THEN '√' ELSE '' END AS Ö÷¼ü,
b.name AS ÀàÐÍ, a.length AS ³¤¶È, COLUMNPROPERTY(a.id, a.name, 'PRECISION')
AS ¾«¶È, ISNULL(COLUMNPROPERTY(a.id, a.name, 'Scale'), 0) AS СÊýλÊý,
CASE WHEN a.isnullable = 1 THEN '√' ELSE '' END AS ÔÊÐí¿Õ, ISNULL(e.text, '')
AS ĬÈÏÖµ, ISNULL(g.[value], '') AS ×Ö¶Î˵Ã÷, d.crdate AS ´´½¨Ê±¼ä,
CASE WHEN a.colorder = 1 THEN d.refdate ELSE NULL END AS ¸ü¸Äʱ¼ä
Ïà¹ØÎĵµ£º
UltraLite®J£ºBlackBerryÉÏÔËÐеÄСÊý¾Ý¿âºÍͬ²½ÒýÇæ
MobiLink £ºÔËÐÐÔÚ·þÎñÆ÷ÉÏÊý¾Ý¿âͬ²½·þÎñÆ÷£¬¿ÉÒÔ°ÑÉ豸ÉϵÄÊý¾Ýͬ²½µ½ºǫ́µÄ¡£°üº¬ÔÚSQL Anywhere 11ÀïÃæ¡£
SQL Anywhere ÊÇÒµÄÚÁìÏȵÄÒÆ¶¯ºÍǶÈëʽÊý¾Ý¿â£¬ÌṩÊý¾Ý¹ÜÀíºÍ½»»»¼¼Êõ£¬ÎªÒ»Ïß»·¾³ÖеÄÓ¦ÓóÌÐòÌṩ֧³Ö¡£
SQL Anywhere רΪ²»¾ß±¸ÏÖ³¡ IT Ö§³Ö¡¢Ô ......
VS2008 Ìí¼ÓSQLServerÎļþ ¾³£»áÅöµ½´íÎó£¬ÏÖÔÚ½«¼¸¸ö³£¼ûµÄ´íÎóÂÞÁÐһϣ¬
“´Ë°æ±¾µÄ sql server ²»Ö§³ÖÓû§ÊµÀýµÇ¼±êÖ¾¡£¸ÃÁ¬½Ó½«¹Ø±Õ¡£”
½â¾ö°ì·¨:
ÔÚÁ¬½ÓÊôÐÔµÄÉèÖÃÀï±ß,µã“¸ß¼¶”,½«User Instance ÉèÖÃΪfalse,ĬÈϵÄtrue,ËùÒԲŵ¼ÖÂÕâ¸öÎÊÌâµÄ³öÏÖ.
“ÓëSQL ServerÎļþ£¨*.m ......
×î½üÔÚѧϰoracleµÄʱºòÓöµ½Ò»¸öÎÊÌ⣬ÀÏÊÇŪ²»Çå³þwhere ºÍhavingµÄÇø±ð£¬ÔÚÍøÉϲéÒ»²é£¬¸Ð¾õ»¹¿ÉÒÔ£¬°ÑÒÔÏÂÎÒ²éµÄ×ÊÁÏÍÆ¼ö¸ø´ó¼Ò¡£
ÔÚselect Óï¾äÖпÉÒÔʹÓÃgroup by ×Ӿ佫Ðл®·Ö³É½ÏСµÄ×飬Ȼºó£¬Ê¹ÓþÛ×麯Êý·µ»ØÃ¿Ò»¸ö×éµÄ»ã×ÜÐÅÏ¢£¬ÁíÍ⣬¿ÉÒÔʹÓÃhaving×Ó¾äÏÞÖÆ·µ»ØµÄ½á¹û¼¯¡£group&n ......
»ùÓÚË÷ÒýµÄSQLÓï¾äÓÅ»¯Ö®½µÁúÊ®°ËÕÆ
1 ǰÑÔ
¿Í·þÒµÎñÊܵ½SQLÓï¾äµÄÓ°Ïì·Ç³£´ó£¬ÔÚ¹æÄ£±È½Ï´óµÄ¾Öµã£¬ÍùÍùÒòΪһ¸öСµÄSQLÓï¾ä²»¹»ÓÅ»¯£¬µ¼ÖÂÊý¾Ý¿âÐÔÄܼ±¾çϽµ£¬Ð¡ÐÍ»úidleËùÊ£ÎÞ¼¸£¬Ó¦Ó÷þÎñÆ÷¶ÏÁ¬¡¢³¬Ê±£¬ÑÏÖØÓ°ÏìÒµÎñµÄÕý³£ÔËÐС£Òò´Ë£¬³ÆµÍЧµÄSQLÓï¾äΪ¿Í·þÒµÎñµÄ ......
linq to sql ÔÚ²åÈëÖµµÄʱºò»¹ÊǺܷ½±ã¡£ÓÐʱºòÎÒÃÇÐèÒªÔÚ²åÈëÒ»¸öеÄʵÌåÖ®ºóµÃµ½ÄǸöʵÌåµÄÖ÷¼üIDµÄÖµ£¬Õâ¸öIDµ±È»±ØÐëÊÇ×ÔÔö¡£Ò»¶Îʱ¼äÎÒÒ»Ö±ÈÏΪֱ½ÓʹÓÃlinq to sqlµÄ²åÈë»úÖÆÊDz»¿ÉÒÔÔÚ×öµ½µÄ£¬ËùÒÔÖ»ÓÐʹÓô洢¹ý³ÌµÄ£¬¾ßÌå¿ÉÒԲ鿴ÕâÆªÎÄÕ£ºhttp://blog.benhall.me.uk/2008/01/custom-insert-logic-with-linq-to- ......