Ìí¼ÓÊý¾ÝÔ´²¢ÅäÖÃÊý¾ÝÔ´Óësql ServerÉí·ÝÑé֤ģʽ
ÔÚÊý¾Ý¿âÓ¦ÓóÌÐò·¢²¼Ê±£¬¿Í»§¶Ë°²×°ÔÚ¾ÖÓòÍøÖеÄÖ÷»úAÉÏ£¬sql server °²×°ÔڸþÖÓòÍøµÄÖ÷»úBÉÏ¡£¿Í»§¶ËÈí¼þÖаüº¬ÓÐËüÒªÁ¬½ÓµÄÊý¾Ý¿âµÄÐÅÏ¢¡£ÈçÊý¾ÝÔ´£¬·þÎñÆ÷Ãû³Æ£¬Êý¾Ý¿âµÈ£¬ÊµÀý£ºdata source=SQLOLEDB;SERVER=DongZi\sqlExpress;uid=sa;pwd=123;database=MachineRoom
¡£ÄÇôÎÒÃÇÔÚÖ÷»úAÖоÍÓ¦¸Ã´æÔÚÈí¼þÖÐËùÒªÇóµÄÊý¾ÝÔ´“SQLOLEDB”,¹Ê¶ø£¬°²×°Èí¼þºóÎÒÃÇÒªÔÚÖ÷»úAÖÐÌí¼ÓÊý¾ÝÔ´SQLOLEDB(ÕâÖ»ÊǸöÃû×Ö£¬ÒÀ¾Ý×Ö·û´®ÖеÄdata sourceÖ¸¶¨µÄÖµËù¶¨£©
ÔÚ¿ØÖÆÃæ°å-¡·¹ÜÀí¹¤¾ß-¡·Êý¾ÝÔ´ ÖÐÌí¼ÓÊý¾ÝÔ´¡£
Íê³ÉÏòµ¼µÄ¹ý³ÌÖÐҪѡÔñÐèÒªµÄ·þÎñÆ÷¡£¸Õ¿ªÊ¼Ê±ÎҵķþÎñÆ÷²»ÄܳöÏÖ£¬¸ü²»ÄÜÁ¬½ÓÉÏÁË¡£ÎÒ×öÁËÏÂÃæµÄ³¢ÊÔ£º
1 Ê×ÏÈÄܹ»ÈÃÕâÁ½Ì¨»úÆ÷Äܹ»ÔÚÍøÉÏÁÚ¾ÓÀïÏ໥·ÃÎÊ£¨½¨Á¢ÔÚͬһ¹¤×÷×éÖУ©
2 ÔÚsql Server2005ÍâΧӦÓÃÅäÖÃÆ÷ÖпªÆôsql Server browser·þÎñ
ÏÖÔÚ¿ÉÒÔÑ¡ÔñÎҵķþÎñÆ÷ÁË¡£²»¹ýÒªÊÇ¿Í»§¶Ë¾ÍºÍ·þÎñÆ÷ÔÚͬһ̨»ú×ÓAÉÏ£¬ÎÒÃÇÖ±½ÓʹÓÃwidowsÑéÖ¤¾ÍÐС£µ«ÔÚ¿Í»§¶ËÔÚÖ÷»úBÉÏ£¬ÎÒÃǾÍҪѡÔñsql ServerÑéÖ¤·½Ê½ÁË£¡ÕâÑù»ú·¿ÊÕ·Ñϵͳ¾Í³É¹¦Íê³ÉÁË»ù±¾µÄ·¢²¼ÈÎÎñ¡£
widowsÑéÖ¤ÓÃÓÚ¿Í»§¶Ë·þÎñÆ÷ÔÚͬһ̨»ú×ÓÉÏ£¨Éв»Ê®·ÖÃ÷È·ÕâÖÖÑéÖ¤·½Ê½ÊÇ·ñ¿ÉÒÔÓÃÓÚ²»Í¬»úÆ÷Ö®¼ä£©£¬sql ServerÑéÖ¤·½Ê½Ôò¿ÉÒÔÓÃÔÚÈκÎÇé¿ö¡£
ÁíÍâÈç¹ûÏë²»ÔÚ¿Í»§¶ËµÄ»ú×ÓAÉÏÌí¼Ó²¢ÅäÖÃÊý¾ÝÔ´£¬Ôò¿ÉÒÔÔÚÈí¼þµÄÁ´½Ó×Ö·û´®ÖÐÖ¸¶¨data source=Ò»¸öipµØÖ·£¬Èçdata source=192.168.24.11;server=……
Ïà¹ØÎĵµ£º
×î½ü,Òò¸öÈ˵çÄÔÓ²ÅÌËð»µ,йºÈëÁË500GµÄ´óÓ²ÅÌ,°²×°ÁËwindows7,ÔÚwin7ÉÏ°²×°Á˶à¸öÐéÄâxp»ú,ÐéÄâ»úÓëʵ¼ÊµÄ»úÆ÷(Ö÷»ú)×é³ÉÁËÒ»¸ö¾ÖÓòÍø,ʵÏÖÔÚÐéÄâ»úÖÐͨ¹ýÔ¶³ÌÁ¬½ÓÖ÷»úµÄsql server.ÏÖ½«ÎÒµÄÊÔÑé¹ý³Ì½éÉÜÈçÏÂ,¹©ÓÐÐËȤ³¢ÊԵĴóÏÀ²Î¿¼.
1. °²×°ÐéÄâ»ú»·¾³.
ÏÈ°²×°window7.0Æì½¢°æ (רҵÓëÆóÒµ°æÒ²¿ ......
ÔÚSQL ServerÖУ¬Èç¹û°Ñ±íµÄÖ÷¼üÉèΪidentityÀàÐÍ£¬Êý¾Ý¿â¾Í»á×Ô¶¯ÎªÖ÷¼ü¸³Öµ¡£ÀýÈ磺
create table customers (
id int identity(1,1) primary key not null,
name varchar(15)
);
insert into customers(name) values("name1"),("name2");
select id from customers;
²éѯ½á¹ûΪ£º
id
---
1
2
ÓÉ´Ë¿ ......
create function fun_getPY(@str nvarchar(4000))
returns nvarchar(4000)
as
begin
declare @word nchar(1),@PY nvarchar(4000)
set @PY=''
while len(@str)>0
begin
set @word=left(@str,1)
--Èç¹û·Çºº×Ö×Ö·û£¬·µ»ØÔ×Ö·û
set @PY=@PY+(case when unicode(@word) between 19968 and 19968+20901
......
1,SELECT *,CASE OrderStatus WHEN 1 THEN 'δ´¦Àí' when 2 THEN 'Ëø¶¨' when
3 THEN 'ÒѳöƱ' ELSE '¹ýÆÚ' END
from dbo.T_OrderItem
2,
SELECT *,CAST(ROUND(CAST (HostWin AS FLOAT)/(HostWin+HostDraw+HostBear),2)*100 AS varchar)+'%' AS HostWinRate,
& ......
´ó¼Ò¶¼ÖªµÀ£¬ÓÃPL/SQLÁ¬½ÓOracle£¬ÊÇÐèÒª°²×°Oracle¿Í»§¶ËÈí¼þµÄ¡£ÓÐûҪÏë¹ý²»°²×°Oracle¿Í»§¶ËÖ±½ÓÁ¬½ÓOracleÄØ£¿
ÆäʵÎÒÒ»Ö±ÏëÕâÑù×ö£¬ÒòΪÕâ¸ö¿Í»§¶ËʵÔÚÌ«ÈÃÈËÌÖÑáÁË£¡£¡£¡²»µ«»á°²×°Ò»¸öJDK£¬¶øÇÒ»¹»á°Ñ×Ô¼º·ÅÔÚ»·¾³±äÁ¿µÄ×îÇ°Ã棬»áÔì³É²»Ð¡µÄÂé·³¡£
&n ......