SQl server2000 ѧϰ×ܽá
ÉÏÖÜÒ»java µÄʧÀûÁË£¬ËäÈ»»¹Ã»Õýʽ¿ªÕâÃſΣ¬µ«ÎÒÒ²×ÔѧÁË°ëÄ꣬Õâ´ÎµÄʧÀûÈÃÎÒÉî¿ÌÈÏʶÁË×Ô¼ºËù´æÔڵIJ»×㡣ΪÒÔºóѧϰÁôÏÂÁ˱¦¹óµÄ¾Ñé¡£Ê컰˵£º¡°²»È뻢Ѩ£¬Ñɵû¢×Ó¡±¡£
ºóÌ죬ÎÒÒªÔÙÒ»´ÎÈ¥±±´ó¡£Õâ´Î¿¼SQL SERVER2000 £¬Í¬Ñù£¬ÕâÃÅ»¹Ã»Ñ§Í꣬Æäʵ£¬ÊǸտªÊ¼Ñ§¡£Ñ§µ½Á˵ÚÈýÕ¹ØϵģʽÉè¼ÆÔÀí £¬ ËäȻûÓбØʤµÄÐÅÐÄ¡£µ«ÎһᾡÎÒÈ«Á¦¡£³åÆÆ×îºóÒ»µÀ·À»ðÏß¡£¾¹ýÕâÁ½ÌìµÄ²ÙÁ·£¬ÎÒ×ܽ᣺¿¼Êý¾Ý¿âÆäʵÓо÷ÇÏ¡£¿´¿´ÀúÄ꿼Ìâ¾Í»á¾ªÆæµÄ·¢ÏÖÿÄêµÄÀàÐͺÜÏñ¡£ËäÈ»£¬Ã¿´Î¿¼ÊÔÄÚÈݶ¼²»Ò»Ñù£¬µ«ÎÞ·ÇÒ²¾ÍÊÇÏÂÃ漸ÖÖ¿¼ÊÔÌâÐÍ£º
1£¬½¨±í ÉèÖÃÖ÷¼ü Íâ¼ü ʵÌåÀàÐÍ ÓÐÎÞ·µ»ØÖµ
2£¬Íù±íÀïÌîÊý¾Ý £¨ÕâÀïÓкܶàСµÄϸ½Ú£©
3£¬SQL ²éѯ ÆäÖаüº¬ÈýСÌâ £¬Ã¿Ò»Ð¡ÌâÓв»Í¬µÄ·½Ê½¡£
4£¬Ð޸ļǼ
5£¬É¾³ý¼Ç¼
6£¬ÓÎ±ê ¿ÉÄÜÕâ¶ÔÎÒÀ´ËµÄã×îÓÐÌôÕ½Ð﵀ ÒòΪÎÒ¸ù±¾¾Í²»¶®Óαꡣ¶ÔÎÒÀ´ËµÊÇÄѵ㣬µ«¶Ô±ðÈË¿ÉÄܾͺÜÈÝÒס£ÎÒ¸ù±¾¾Íûѧ¹ý¡£²»¹ý»¹ÓÐÀ뿼ÊÔ»¹ÓÐ26Сʱ£¬ÎÒ»¹ÓÐʱ¼ä£¬ÕâÊÇÎÒ½ÓÏÂÀ´ÒªÑ§µÄÖص㡣Óαê×öµÄºÃ²»ºÃÊÇÅжÏÄãÄÜ·ñµÃÓŵĹؼü¡£½ñÍíÁ·Ï°ÁËÕâµÀÌ⣺
create table e191_sporter( sno char (5) primary key,
sname varchar (20) not null,
sex char (2) ,
dname varchar (20) not null)
go
create table e191_project( pno char(5) primary key ,
pname varchar(20) ,
address varchar (20) )
go
create table e191_grade ( sno char(5),
pno char(5),
credit tinyint null ,
check(credit in(6,4,2,0)),
primary key (sno,pno),
foreign key(sno) references e191_sporter(sno),
foreign key(pno) references e191_project(pno))
go
insert into e191_sporter values('1001','ÀîÃ÷','ÄÐ','¼ÆËã»úϵ') ;
insert into e191_sporter values('1002','ÕÅÈý','ÄÐ','Êýѧϵ') ;
insert into e191_sporter values('1003','ÀîËÄ','ÄÐ','ÎïÀíϵ') ;
insert into e191_sporter values('1004','Íõ¶þ','ÄÐ','ÎïÀíϵ') ;
insert into e191_sporter values('1005','ÀîÄÈ','Å®','Êýѧϵ') ;
insert into e191_sporter values('1006','ËïÙ³','Å®','Êýѧϵ') ;
insert into e191_project values('x001','ÄÐ×ÓÎåǧÃ×','Ò»²Ù³¡') ;
insert into e191_project values('x002','ÄÐ×Ó±êǹ','Ò»²Ù³¡') ;
insert into e191_project values('x003','ÄÐ×ÓÌøÔ¶','¶þ²Ù³¡') ;
insert into e191_project values('x004','Å®
Ïà¹ØÎĵµ£º
ÉÏÍøÒ»²é£¬SQL server2008¶¼³öÀ´ÁË£¬ÎÒ»¹ÊÇÏÈ´Ó»ù´¡µÄѧÆð°É¡£
SQL server2000µÄ³£¼û°æ±¾ÓУºÆóÒµ°æ¡¢±ê×¼°æ¡¢¸öÈË°æ¡¢¿ª·¢°æ¡£
ÆóÒµ°æ£º¹¦ÄÜÈ«Ã棬ӦÓÃÓÚ´óÖÐÐͲúÆ··þÎñ´¦ÀíÆ÷£¬Ö§³Ö´óÐÍÍøÕ¾¡¢Áª»úÊÂÎñ´¦Àí£¬Áª»ú·ÖÎö´¦ÀíµÄÐÔÄÜ¡£
±ê×¼°æ£ºÊÊÓÃÓÚСÐ͹¤×÷×飬²»Ö§³Ö´óÐÍÊý¾Ý¿â£¬Êý¾Ý²Ö¿âºÍÍøÕ¾µÄ¹¦ÄÜ£¬¶øÇÒ²»Ö§³ÖËùÓÐ¹Ø ......
¶ÔÏóÃüÃûµÄÔ¼¶¨£ºÊý¾Ý¿âÃû.ËùÓÐÕßÃû.¶ÔÏóÃû
Ç°Á½Õß¿ÉÊ¡ÂÔ£¬Ä¬ÈÏÖµÊý¾Ý¿âÊǵ±Ç°Êý¾Ý¿â£¬ËùÓÐÕßÊÇdbo
±ðÃû£ºÊý¾Ý¿âÃû³Æ as Êý¾Ý¿â±íÃû Ö÷ÒªÊÇÔö¼ÓselectÓï¾äµÄ¿É¶ÁÐÔ£¬Èç¹ûÒѾΪÊý¾Ý±íÖƶ¨Á˱ðÃû£¬Ôò
ÔÚÏàÓ¦µÄSQLÓï¾äÖУ¬¶Ô¸ÃÊý¾Ý±íµÄËùÓÐÏÔʾÒýÓö¼ÒªÊ¹ÓñðÃû£¬¶ø²»ÄÜʹÓÃÊý¾Ý±íÃû¡£
selectÓï¾äÊÇÊý¾Ý¼ìË÷ÖÐ×îƵ·±µÄ»î¶ ......
exec('selectIDENTITY(int,1,1) as ID,fnum,into #yuecu from store_store where '+@Parameter)
select XX,XX1,XX2 from #yuecu
ÕâÑù´´½¨Ò»¸öÁÙʱ±íÒÔºóÎÒÔÙÏë´ÓÁÙʱ±íÖÐÈ¡Êý¾ÝÌáʾ¶ÔÏóÃû#yuecu&n ......
ÔÎijö´¦£ºhttp://blog.csdn.net/zk911/archive/2005/11/23/535432.aspx
×÷Õߣºzk911
¿´ÍêÕâƪÎÄÕµĵÚÒ»¸Ð¾õÊÇ£¬ËäÈ»¶ÔÓÚÈÕÆÚÀàÐÍÊý¾ÝʹÓõúÜËã˳Àû£¬²»¹ý×÷Õß Ìáµ½µÄһЩ¶«Î÷»¹Õæ²»ÖªµÀ¡£ÓÐʱºòÔÚÓ¦ÓÃÉÏ£¬²»¾õµÃ±ÈÀÏÍâ²îµ½ÄÇÀïÈ¥¡£µ«ÊÇ£¬ ÀÏÍâµÄÒ»¸öÓÅÁ¼Ï°¹ßϸ¿Û¸ÅÄî²¢½øÐÐʵ֤¼ìÑ飻¶øÎÒÃǵÄÏ°¹ßÊǸÅÄîÊǸÅÄӦÓÃ Ê ......
ÒòΪ²»Ö§³Ö´æ´¢¹ý³Ì£¬ËùÒÔ²éѯÓï¾äÈçÏ£º
string SLQuery =
"INSERT INTO ParkLocation(ParkName,Latitude, Longtitude,Charge,TotalSpace,EmptySpace,ParkCaption,UpdataTime)"+
&nb ......