SQL Server 2000µÄJDBCÁ¬½ÓÎÊÌâ½â¾ö·½·¨
¾¹ýºÃ¼¸ÌìµÄ·ÜÕ½£¬JDBCÖÕÓڳɹ¦Á¬½ÓÁËSQL Server 2000£¬ÆÚ¼ä×ßÁ˲»ÉÙÍä·£¬ÔÚÕâÀï·ÖÏíÎÒµÄÒ»µã¾Ñé
Ò»¡¢ÎҵĻ·¾³
Windows XP+JDK6u15+Microsoft SQL Server 2000£¨SP4£©+JCreator
ÎÒÏÈÔÚÍøÉÏÏÂÔØÊý¾Ý¿âÇý¶¯³ÌÐò£¬Ä¿Â¼ÏÂÓÐÈý¸ö°ümsbase.jar mssqlserver.jar msutil.jar
1¡¢ÔÚÃüÁîÐÐϱàÒëÔËÐУ¬ÅäÖû·¾³±äÁ¿ ½«ÕâÈý¸ö°üµÄ·¾¶¼ÓÈëCLASSPATHÖÐ
£¨ÎÒÊÇÖ±½Ó½«Õâ3¸ö°ü¸´ÖƵ½E:\Java\lib\extÎļþ¼ÐÏ£¬ÒòΪÕâÊÇÎÒµÄJava°²×°Ä¿Â¼£©
2¡¢ÔÚJCreatorÖÐ ÅäÖà ѡÏî JDKÅäÖÃÎļþ ±à¼ Ìí¼Ó´æµµÂ·¾¶ Ìí¼ÓÈý¸ö°ü
3¡¢ÔÚEclipse´ËÖÐ Ñ¡ÔñÏîÄ¿µÄ¹¹½¨Â·¾¶——¿â—— Ìí¼ÓÍⲿJAR ½«ÕâÈý¸öÌí¼Ó½øÈ¥
£¨2¡¢3ûÊÔ¹ý£¬ÒòΪÎÒÒ»°ãÌí¼Ó¶îÍâµÄJARÎļþ°ü¶¼ÊÇ·ÅÈëÉÏÃæ˵µÄÄǸöĿ¼ÖеÄÒ²¾ÍÊÇclasspath£©
¶þ¡¢³öÏÖµÄÎÊÌâ¼°½â¾ö°ì·¨
1¡¢ÊDz»ÊdzöÏÖÁËError establishing socketÖ®ÀàµÄ´íÎó ºÇºÇ
ÕâÊÇÒòΪÁ¬½ÓÊý¾Ý¿âµÄ1433¶Ë¿Úû´ò¿ª ÎÒÃDZØÐëÒªÏÂÔØSP4µÄ²¹¶¡
http://www.microsoft.com/downloads/details.aspx?FamilyID=8e2dfc8d-c20e-4446-99a9-b7f0213f8bc5&DisplayLang=zh-cn
ÊÂʵÉÏÎÒ¾ÍÊÇÏÂÔصÄSP4²¹¶¡£¬½«
SQL2000.AS-KB884525-SP4-x86-CHS.EXE£¬
SQL2000.MSDE-KB884525-SP4-x86-CHS.EXE£¬
SQL2000-KB884525-SP4-x86-CHS.EXE
Õâ3¸öÎļþÈ«²¿ÏÂÔØ£¬È»ºóÈ«²¿½âѹ£¬×îºóÔËÐÐsetup.batÎļþ£¬¾Í¿ÉÒÔ°²×°SP4²¹¶¡ÁË¡£ÍêÁËÖ®ºóÊÔÊÔ¿´³ÌÐò£¬ÕæOKÁË£¡
Èý¡¢²¹³ä
дÁ¬½Ó´úÂëʱÐèҪעÒâ2000ºÍ2005µÄ²»Í¬£º
1¡¢Á¬½ÓSqlServer2000
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
URL = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=tempdb";
2¡¢Á¬½ÓSqlServer2005
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
URL = "jdbc:sqlserver://localhost:1433;DatabaseName=tempdb";  
Ïà¹ØÎĵµ£º
SQLÔÚ½¨Á¢Óë·þÎñÆ÷µÄÁ¬½Óʱ³ö´íµÄ½â¾ö·½
ÔÚ½¨Á¢Óë·þÎñÆ÷µÄÁ¬½Óʱ³ö´í¡£ÔÚÁ¬½Óµ½ SQL Server 2005 ʱ£¬ÔÚĬÈϵÄÉèÖÃÏ SQL Server ²»ÔÊÐí½øÐÐÔ¶³ÌÁ¬½Ó¿ÉÄܻᵼÖ´Ëʧ°Ü¡£ (provider: ÃüÃû¹ÜµÀÌṩ³ÌÐò, error: 40 - ÎÞ·¨´ò¿ªµ½ SQL Server µÄÁ¬½Ó)
¸Õ¸Õ°²×°µÄÊý¾Ý¿âϵͳ£¬°´ÕÕÄ ......
http://blog.csdn.net/iamstillzhang/archive/2007/04/01/1548377.aspx
ÓÃmysqlÔ´Âë½øÐÐSQL½âÎö
MysqlÊÇͨ¹ýyacc½øÐÐSQLÓï¾ä½âÎöµÄ£¬ÕâÀï½éÉÜÒ»ÏÂÈçºÎʹÓÃmysqlµÄÔ´Âë½øÐÐSQLÓï¾ä½âÎö¡£ÓÉÓÚMysqlµÄÔ´´úÂë×¢ÊͱȽÏÉÙ£¬¶øÇÒȱÉÙ×ÊÁÏ£¬ËùÓÐЩµØ·½Ñо¿²»¹»ÉîÈë¡£
1 Filed½éÉÜ
MY ......
ORDER BY ÅÅÐò
ASC ÉýÐò(ĬÈÏ)
DESC ½µÐò
select * from s_emp order by dept_id , salary desc
²¿ÃźÅÉýÐò£¬¹¤×ʽµÐò
¹Ø¼ü×ÖdistinctÒ²»á´¥·¢ÅÅÐò²Ù×÷¡£
select * from employee order by 1; //°´µÚÒ»×Ö¶ÎÅÅÐò
NULL±»ÈÏΪÎÞÇî´ó¡£order by ¿ÉÒÔ¸ú±ðÃû¡£
select table_name ......
1. ˵Ã÷£º¸´ÖƱí(Ö»¸´Öƽṹ£¬Ô´±íÃû£ºa£¬Ð±íÃû£ºb)
SQL: select * into b from a where 1<>1;
2. ˵Ã÷£º¿½±´±í(¿½±´Êý¾Ý£¬Ô´±íÃû£ºa£¬Ä¿±ê±íÃû£ºb)
SQL: insert into b(a, b, c) select d, e, f from b;
&nb ......