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

MSSQL¿Õ¼ä ¿ÉÒÔÔ¶³ÌÁ¬½ÓÂð£¿

ÎÒÏëÎÊÏÂÐéÄâÖ÷»úÔËÓªÉ̵ÄMSSQL¿Õ¼ä¿É²»¿ÉÒÔÔ¶³ÌÁ¬½Ó£¿
¾ÍÊÇ˵ÔÚÎҵĻúÆ÷ÉÏÄܲ»ÄÜÓÃSSMSÁ¬½ÓËûµÄ·þÎñÆ÷
Èç¹ûÓÐÇë¸æËßÎÒÔËÓªÉ̵ĵØÖ·£¬Ð»Ð»£¡
ÔËÓªÉ̵ĵØÖ·½ÐÔËÓªÉ̸æËßÄ㣬¹Ø¼üµÄÊÇËû³ýÁËÔÊÐíÄãµÄ»úÆ÷Á¬½ÓÍ⣬»¹µÃ¿ª·ÅÓû§ÃûºÍÃÜÂë¸øÄã

×Ô¼ºUP~£¡£¡£¡
ÍûÁ˽âµÄÅóÓÑ͸¶һÏÂ

/*²»Í¬·þÎñÆ÷Êý¾Ý¿âÖ®¼äµÄÊý¾Ý²Ù×÷*/

--´´½¨Á´½Ó·þÎñÆ÷
exec sp_addlinkedserver 'ITSV ', ' ', 'SQLOLEDB ', 'Ô¶³Ì·þÎñÆ÷Ãû»òipµØÖ· '
exec sp_addlinkedsrvlogin 'ITSV ', 'false ',null, 'Óû§Ãû ', 'ÃÜÂë '

--²éѯʾÀý
select * from ITSV.Êý¾Ý¿âÃû.dbo.±íÃû

--µ¼ÈëʾÀý
select * into ±í from ITSV.Êý¾Ý¿âÃû.dbo.±íÃû

--ÒÔºó²»ÔÙʹÓÃʱɾ³ýÁ´½Ó·þÎñÆ÷
exec sp_dropserver 'ITSV ', 'droplogins '

--Á¬½ÓÔ¶³Ì/¾ÖÓòÍøÊý¾Ý(openrowset/openquery/opendatasource)
--1¡¢openrowset

--²éѯʾÀý
select * from openrowset( 'SQLOLEDB ', 'sql·þÎñÆ÷Ãû '; 'Óû§Ãû '; 'ÃÜÂë ',Êý¾Ý¿âÃû.dbo.±íÃû)

--Éú³É±¾µØ±í
select * into ±í from openrowset( 'SQLOLEDB ', 'sql·þÎñÆ÷Ãû '; 'Óû§Ãû '; 'ÃÜÂë ',Êý¾Ý¿âÃû.dbo.±íÃû)

--°Ñ±¾µØ±íµ¼ÈëÔ¶³Ì±í
insert openrowset( 'SQLOLEDB ', 'sql·þÎñÆ÷Ãû '; 'Óû§Ãû '; 'ÃÜÂë ',Êý¾Ý¿âÃû.dbo.±íÃû)
select *from ±¾µØ±í

--¸üб¾µØ±í
update b
set b.ÁÐA=a.ÁÐA
from openrowset( 'SQLOLEDB ', 'sql·þÎñÆ÷Ãû '; 'Óû§Ãû '; 'ÃÜÂë ',Êý¾Ý¿âÃû.dbo.±íÃû)as a inner join ±¾µØ±í b
on a.column1=b.column1

--openqueryÓ÷¨ÐèÒª´´½¨Ò»¸öÁ¬½Ó


Ïà¹ØÎÊ´ð£º

mssqlºÃ¶à±í¶¼"Ö»¶Á"

×î½üÏÂÃ淴Ӧ˵³ÌÐòÒì³£
È»ºó´ò¿ªÊý¾Ý¿âÒ»¿´
·¢Ïֺܶà±í¶¼"Ö»¶Á"״̬??
ÓÃsaµÇ½ҲÊÇ...
ºÜÆæ¹Ö°¡..
´óÅ£ÖªµÀÊÇʲôԭÒòÂð?
Ô¸Òâ³ö¸ß·ÖÇó
Ë­½â¾öÁË
¸ø200·Ö!!
Êý¾Ý¿â³öÎÊÌâÁË?

ÒýÓÃ
×î½üÏÂÃæ ......

accessת»»mssqlºó²éѯºÜÂý

accessʱ²éѯËٶȻ¹Âù¿ìµÄ£¬ÏÖÔÚת³ÉmssqlÁË£¬Êý¾ÝÁ¿²¢²»´ó£¬Í¨³£Êý¾ÝÁ¿¶àЩµÄ¾ÍÊǼ¸Ç§Ìõ£¬µ±È«²¿ÁгöÊý¾ÝʱËÙ¶ÈÒ²²»Âý£¬¾ÍÊÇ°´Ìõ¼þËÑË÷ʱ¾ÍÂýÁË£¬ÇëÎÊÊDz»ÊǸúlikeÓйذ¡£¬µ«ÒÔÇ°ÓÃaccessÂù¿ìµÄ°¡£¬Ò²½¨Á¢ÁËË÷ÒýÁË ......

¹ØÓÚMSSQLĬÈÏÖµµÄÎÊÌâ

ÎÒÔÚMSSQL¹ÜÀíÆ÷Àï°Ñн¨×Ö¶Îstr

ÔÚĬÈÏÖµ»ò°ó¶¨ÄÇÀïÎÒÌîдÁË0

È»ºóÎÒ·¢ÏÖ¡£Èç¹ûÎÒÔÚÔö¼Ó¼Ç¼ʱ¡£Õâ¸öSTR²¢²»ÊÇĬÈϵÄ0¶øÊÇNULLÔõô»ØÊ£¿£¨ÔÚÔö¼Ó×Ö¶Îʱ¡£ÎÒûÓмÈërs("str")µÄÖµ¡£Ô­±¾Ò ......

asp mssql¿ª·¢ÎÊÌâ

ÎÒ¼ÒÓõÄÊÇXP
Ô­À´ÊǸãasp access¿ª·¢
ÏÖÔÚÓÐÒ»¸öÏîÄ¿Òªmssql
xpÎÒÓÖ²»ÄÜ×°sqlÆóÒµ°æ¡£ÇëÎÊÓÐûÓÐʲôÂÌÉ«»òÕߺõÄÈí¼þ½éÉÜ£¬ÄÜ´ò¿ªmssqlµÄmdf

ÒýÓÃ
ÎÒ¼ÒÓõÄÊÇXP
Ô­À´ÊǸãasp access¿ª·¢
ÏÖÔÚ ......

mssql 2005Êý¾Ý¿â Ä£ºý²éѯ ¼±¡£¡£

mssql 2005 ÊÇÓ¢ÓïÕý°æµÄ¡£
²»ÖªµÀΪʲôÀýÈç
select content_cn,content_ru  from table where content_cn like '%ÖÐÎÄ%'
select content_cn,content_ru  from table where content_ru ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ