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

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Óï¾ä½â¾ö·½°¸

2009Äê06ÔÂ24ÈÕ 09:47
create table [±íÃû]
(
[×Ô¶¯±àºÅ×Ö¶Î] int IDENTITY (1,1) PRIMARY KEY ,
[×Ö¶Î1] nVarChar(50) default 'ĬÈÏÖµ' null ,
[×Ö¶Î2] ntext null ,
[×Ö¶Î3] datetime,
[×Ö¶Î4] money null ,
[×Ö¶Î5] int default 0,
[×Ö¶Î6] Decimal (12,4) default 0,
[×Ö¶Î7] image null ,
)
É ......

SQL »ù±¾½¨±íÓï¾ä

×÷Ϊ±¸Íü°É.ÔÚ»ú·¿ÀïÊäÈëµÄ.
/*CREATE TABLE Student
(Sno CHAR(9) PRIMARY KEY,
 Sname CHAR(20) UNIQUE,
 Ssex CHAR(2),
 Sage SMALLINT,
 Sdept CHAR(20)
);*/
/*CREATE TABLE Course
(Cno CHAR(4) PRIMARY KEY,
 Cname CHAR(40),
 Cpno CHAR(4),
 Credit SMALLINT,
&n ......

sql ±íÐÞ¸ÄÁÐ

 create table #a
(
a int identity(1,1) primary key,
b int default(0) not null,
c nvarchar(20)
)
insert into #a(c)
select 'a' union all
select 'b' union all
select 'c' union all
select 'd' union all
select 'e'
select * from #a
alter table #a drop constraint DF__#a_____________b__12 ......

ÓÃSQLɾ³ýÖظ´¼Ç¼µÄNÖÖ·½·¨

ÓÃSQLɾ³ýÖظ´¼Ç¼µÄNÖÖ·½·¨
2009-06-03 17:35
ÀýÈ磺
id           name         value
1               a     &nbs ......

Oracle SQLÓï¾ä

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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ