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

¼òµ¥µÄ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 ¸ü¸Äʱ¼ä


Ïà¹ØÎĵµ£º

SybaseµÄSQL Anywhere for BlackBerry

UltraLite®J£ºBlackBerryÉÏÔËÐеÄСÊý¾Ý¿âºÍͬ²½ÒýÇæ
MobiLink £ºÔËÐÐÔÚ·þÎñÆ÷ÉÏÊý¾Ý¿âͬ²½·þÎñÆ÷£¬¿ÉÒÔ°ÑÉ豸ÉϵÄÊý¾Ýͬ²½µ½ºǫ́µÄ¡£°üº¬ÔÚSQL Anywhere 11ÀïÃæ¡£
SQL Anywhere ÊÇÒµÄÚÁìÏȵÄÒƶ¯ºÍǶÈëʽÊý¾Ý¿â£¬ÌṩÊý¾Ý¹ÜÀíºÍ½»»»¼¼Êõ£¬ÎªÒ»Ïß»·¾³ÖеÄÓ¦ÓóÌÐòÌṩ֧³Ö¡£
SQL Anywhere רΪ²»¾ß±¸ÏÖ³¡ IT Ö§³Ö¡¢Ô ......

ÓÃTSQL°ÑAccessµÄ±íµ¼Èëµ½Ô¶³ÌSql Server

ÓÃTSQL°ÑAccessµÄ±íµ¼Èëµ½Ô¶³ÌSql Server£º
°Ñaccess µÄ.mdbÀït_itemList ±íµÄÊý¾Ý²åÈëµ½Ô¶³ÌSqlServerµÄt_itemL1111111±íÀï¡£
SELECT  top 10 *  INTO  t_itemL1111111 IN [ODBC] 
[ODBC;Driver=SQL Server; UID=jyb;PWD=jyb;Server=10.1.18.49;DataBase=ËùÓкϲ¢;]
    &nb ......

SQL×Ó²éѯʵÀý

×Ó²éѯÊÇÔÚÒ»¸ö²éѯÄڵIJéѯ¡£×Ó²éѯµÄ½á¹û±»DBMSʹÓÃÀ´¾ö¶¨°üº¬Õâ¸ö×Ó²éѯµÄ¸ß¼¶²éѯµÄ½á¹û¡£ÔÚ×Ó²éѯµÄ×î¼òµ¥µÄÐÎʽÖУ¬×Ó²éѯ³ÊÏÖÔÚÁíÒ»ÌõSQLÓï¾äµÄWHERE»òHAVING×Ó¾ÖÄÚ¡£ 
    ÁгöÆäÏúÊÛÄ¿±ê³¬¹ý¸÷¸öÏúÊÛÈËÔ±¶¨¶î×ۺϵÄÏúÊ۵㡣
SELECT CITY
from OFFICES
WHERE TARGET&nbs ......

SQL²éѯÓÅ»¯

»ùÓÚË÷ÒýµÄSQLÓï¾äÓÅ»¯Ö®½µÁúÊ®°ËÕÆ
1         Ç°ÑÔ
¿Í·þÒµÎñÊܵ½SQLÓï¾äµÄÓ°Ïì·Ç³£´ó£¬ÔÚ¹æÄ£±È½Ï´óµÄ¾Öµã£¬ÍùÍùÒòΪһ¸öСµÄSQLÓï¾ä²»¹»ÓÅ»¯£¬µ¼ÖÂÊý¾Ý¿âÐÔÄܼ±¾çϽµ£¬Ð¡ÐÍ»úidleËùÊ£ÎÞ¼¸£¬Ó¦Ó÷þÎñÆ÷¶ÏÁ¬¡¢³¬Ê±£¬ÑÏÖØÓ°ÏìÒµÎñµÄÕý³£ÔËÐС£Òò´Ë£¬³ÆµÍЧµÄSQLÓï¾äΪ¿Í·þÒµÎñµÄ ......

SQl Cookbookѧϰ±Ê¼Ç

1.select  * from A where a.a='a';
  Ö´ÐÐ˳Ðò ÏÈÖ´ÐÐ from ÔÚÖ´ÐÐ where ÖеĶ«Î÷ £¬×îºóÖ´ÐÐ select
2.ÁÐÖµÁ¬½Ó db2 oracle ||  , mysql concat(column1,'sss',column2) sqlServlerʹÓÃ+Á¬½Ó;
3. case when  ±í´ïʽ then ''
           ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ