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

sql¸ù¾Ý»ù±íÅúÁ¿ÐÞ¸Ä×Ó±í

update ×Ó±íÃû 
set ÒªÐ޸ĵÄ×Ó±í×Ö¶Î=b.»ù±íÖÐÒªÌí¼Óµ½×Ó±íÖеÄ×Ö¶Î
from ×Ó±íÃû,(select ×Ó±íÃû.ÒªÐ޸ĵÄ×Ó±í×Ö¶Î,»ù±íÃû.Òª²Î¼Ó±È½ÏµÄ×ֶΠfrom ×Ó±íÃû,»ù±íÃû where »ù±íÃû.Òª²Î¼Ó±È½ÏµÄ×Ö¶Î=×Ó±íÃû.×Ó±íÖÐÒª²Î¼Ó±È½ÏµÄ×Ö¶Î)as b
where b.»ù±íÖÐÒª²Î¼Ó±È½ÏµÄ×Ö¶Î=×Ó±íÒª²Î¼Ó±È½ÏµÄ×Ö¶Î
Èç
update Ä£°å200909
set ³öÇÚÌìÊý=b.´ÎÊý
from Ä£°å200909,(select °²¼àͳ¼Æ.´ÎÊý,°²¼àͳ¼Æ.¹¤ºÅ from Ä£°å200909,°²¼àͳ¼Æ where °²¼àͳ¼Æ.¹¤ºÅ=Ä£°å200909.Ö°ºÅ)as b where b.¹¤ºÅ=Ö°ºÅ


Ïà¹ØÎĵµ£º

SQL SERVER ÓëACCESS¡¢EXCELµÄÊý¾Ýת»»

ÊìϤSQL SERVER 2000µÄÊý¾Ý¿â¹ÜÀíÔ±¶¼ÖªµÀ£¬ÆäDTS¿ÉÒÔ½øÐÐÊý¾ÝµÄµ¼Èëµ¼³ö£¬Æäʵ£¬ÎÒÃÇÒ²¿ÉÒÔʹÓÃTransact-SQLÓï¾ä½øÐе¼Èëµ¼³ö²Ù×÷¡£ÔÚTransact-SQLÓï¾äÖУ¬ÎÒÃÇÖ÷ҪʹÓÃOpenDataSourceº¯Êý¡¢OPENROWSET º¯Êý£¬¹ØÓÚº¯ÊýµÄÏêϸ˵Ã÷£¬Çë²Î¿¼SQLÁª»ú°ïÖú¡£ÀûÓÃÏÂÊö·½·¨£¬¿ÉÒÔÊ®·ÖÈÝÒ×µØʵÏÖSQL SERVER¡¢ACCESS¡¢EXCELÊý¾Ýת»»£ ......

SQLSERVER SQLÐÔÄÜÓÅ»¯

1.Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)¡¡¡¡
¡¡¡¡ SQLSERVERµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬Òò´Ëfrom×Ó¾äÖÐдÔÚ×îºóµÄ±í£¨»ù´¡±ídriving table£©½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏ£¬±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í£¬µ±SQLSERVER´¦Àí¶à¸ö±íʱ£¬»áÔËÓÃÅÅÐò¼°ºÏ²¢µÄ·½Ê½Á ......

²ËÄñѧϰSQL×¢Éä

 Ò»°ã¹úÄÚµÄСһµãµÄÐÂÎÅÕ¾µã³ÌÐò ¶¼ÓÐ ""&request ÕâÖÖ©¶´£¬ÏÂÃæÎÒ½²½â¹¥»÷·½·¨
ÔÚµØÖ·À¸£º
and 1=1
²é¿´Â©¶´ÊÇ·ñ´æÔÚ,Èç¹û´æÔÚ¾ÍÕý³£·µ»Ø¸ÃÒ³,Èç¹ûûÓÐ,ÔòÏÔʾ´íÎ󣬼ÌÐø¼ÙÉèÕâ¸öÕ¾µÄÊý¾Ý¿â´æÔÚÒ»¸öadmin±í
ÔÚµØÖ·À¸£º
and 0<>(select count(*) from admin)
·µ»ØÒ³Õý³£,¼ÙÉè³ÉÁ¢ÁË¡£
ÏÂÃæÀ´²Â²Â¿´ ......

PL/SQL¿éÖÐÈçºÎµ÷ÓÃDDLÓï¾ä

ÔÚPL/SQL¿éÖв»ÄÜÖ±½Óµ÷ÓÃDDLÓï¾ä£¬¿ÉÒÔÀûÓÃÏÂÃæµÄ·½·¨½øÐе÷ÓÃ
·½·¨Ò»£º¶¯Ì¬SQL
execute immediate 'CREATE TABLE newtable AS
                             &nb ......

ÎÒÔÚ±±´óÇàÄñËùѧSQL֪ʶµÄС»ã×Ü

´´½¨Ò»¸öÊý¾Ý¿â£¨¿âÃû£ºÑ§Éú¿â£©²¢ÉèÖÃÁ½¸öÊý¾ÝÎļþºÍÁ½¸öÈÕÖ¾Îļþ
create database ѧÉú¿â
on primary
( name=ѧÉú_data1, filename='e:\ѧÉú_data1.mdf', size=1mb, maxsize=3mb,filegrowth=1mb ),
( name=ѧÉú_data2, filename='e:\ѧÉú_data2.ndf', size=1mb, maxsize=3mb, filegrowth=10% )
log on
( name=ѧÉú_ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ