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

SqlServerÖÐ×Ö·ûÐÍת»»ÎªÊý×ÖÐͳöÏîµÄÎÊÌâ

SqlServerÖÐ×Ö·ûÐÍת»»ÎªÊý×ÖÐͳöÏîµÄÎÊÌâ

select  @rno=rno from deleted;
convert(numeric,@rno);
@rno=@rno/1000;

ÏûÏ¢ 156£¬¼¶±ð 15£¬×´Ì¬ 1£¬¹ý³Ì t2£¬µÚ 11 ÐÐ
¹Ø¼ü×Ö 'convert' ¸½½üÓÐÓï·¨´íÎó¡£
select  @rno=rno from deleted;
set @rno = cast(@rno as numeric)

SQL code:
select @rno=rno from deleted;
SET @rno=convert(numeric,@rno);
SET @rno=@rno/1000;


SQL code:
select @rno=rno from deleted;
SET @rno=convert(numeric(18,5),@rno);
SET @rno=@rno/1000;

Éè¼ÆһϾ«¶È

ÒýÓÃ
select  @rno=rno from deleted;
set @rno = cast(@rno as numeric)


Ŷ£¡Ô­À´Èç´Ë£¡ÕâÑù²ÅÐУ¡
¿ÉÊÇÕâÑùת¹ýÖ®ºóÓÖ³öÏÖ¸öÎÊÌâ

ÏûÏ¢ 102£¬¼¶±ð 15£¬×´Ì¬ 1£¬¹ý³Ì t2£¬µÚ 12 ÐÐ
'@rno' ¸½½üÓÐÓï·¨´íÎó¡£
ת»»³ÉÊýÖµÐÍÖ®ºóΪʲô²»ÄܽøÐÐÊýѧÔËËãÄØ£¿£¿

SQL code:
declare @rno varchar(20)
set @rno=convert(numeric(18,2),@rno);
set @rno=@rno/1000;
select @rno=rno from deleted;


SQL code



Code highlighting produced by


Ïà¹ØÎÊ´ð£º

SQLSERVERÄÜ»ñµÃÁ¬½ÓµÄÓû§µÄIPÂð£¿

SQL SERVERÄÜ»ñµÃÁ¬½ÓµÄÓû§µÄIPÂð£¿

Ö÷ÒªÏëʵÏÖÒÔÏ£º
Ò»¸öÓû§Á¬½Óµ½Êý¾Ý¿â£¬°ÑÓû§µÄÓû§ÃûÓëIP¶¼±£´æÔÚÊý¾Ý¿âÖУ¬À´ÊµÏÖÓû§µÇ¼µÄ¹¦ÄÜ¡£
×îºÃÊÇÓû§µ÷ÓÃÒ»¸ö´æ´¢¹ý³Ì£¬°ÑÓû§Ãû×÷²ÎÊý£¬´æ´¢¹ý³Ì¾Í ......

¡¾ÇóÖú¡¿sqlserver¿ÉÒÔ´´½¨Ö»ÓеǼȨÏÞµÄÓû§Âð

SqlServer´´½¨Óû§Ê±Ä¬ÈϾ͸³ÓèÁËÒ»¸öpublic½ÇÉ«¡£
ÎÒÊÇ·ñ¿ÉÒÔ´´½¨Ò»¸öÓû§£¬ÈÃÕâ¸öÓû§Ö»ÓеǼµÄȨÏÞ£¬Ã»ÓÐÆäËûµÄȨÏÞ£¡

ÎÒµÄÊý¾Ý¿âÊÇSqlServer2000

SQL code:
--Ìí¼ÓµÇ¼ wh1,ÉèÖÃÃÜÂëΪ123,ĬÈÏÊý¾ ......

Ôõô»ñÈ¡sqlserver×îºó²åÈëÐÐÄÚµÄ×ֶΣ¿

Ö÷¼üÊÇuniqueidentifierÀàÐÍ£¬Ã»ÓÐ×ÔÔö×ֶΡ£¡£

ÕâÑùÓ¦¸ÃÔõô»ñÈ¡£¿


L@_@K
SQL code:
SELECT ISNULL(SCOPE_IDENTITY(), -1) AS [SCOPE_IDENTITY]

°´Ê±¼äÅÅÐò
»ò
guid²»Òª×Ô¶¯Éú³É
......

Çë°ïæ½âÊÍÒ»ÏÂsqlserver¿Í»§¶Ëͳ¼ÆµÄÐÅÏ¢

ÏÂÃæÊÇÎÒµÄͳ¼ÆÐÅÏ¢£º

¿Í»§¶ËÖ´ÐÐʱ¼ä 10:28:48
²éѯÅäÖÃÎļþͳ¼ÆÐÅÏ¢
  INSERT¡¢DELETE ºÍ UPDATE Óï¾äµÄÊýÄ¿ 0 0.0000
  INSERT¡¢DELETE »ò UPDATE Óï¾äÓ°ÏìµÄÐÐÊý 0 0.0000
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ