mssql ¶Ì·ÅжÏÄÜʵÏÖÂð
cÓïÑÔÖеÄ&ºÍ&&£¬ÆäÖÐ&&¾ßÓжÌ·ÅжϹ¦ÄÜ£¬ÔÚmssqlÖÐÓжÌ·ÅжÏÂÎÒÓÃand²»ÐУ¬°Ñand»»³É&&±¨´íÁË
MSSQLÖÐûÓÐ&&
½«nvarchar Öµ '1g' ת»»ÎªÊý¾ÝÀàÐÍΪ int µÄÁÐʱ·¢ÉúÓï·¨´íÎó£¬Äܲ»ÄÜÈÃÕâ¸öÌø¹ý£¬¾ÍÊÇ˵²éÕÒµ½²»ÄÜת»»µÄ¾Í²»¹ÜËüÁË
Õâ¸ö£¬Ó¦¸ÃÊÇ¿ÉÒÔÓбä֮ͨ·¨µÄ
ÕâÖÖ¶¼ÊÇÓÃwhereÌõ¼þ¹ýÂ˵ôµÄ£¬¾ÍÏñ2Â¥Ëù˵µÄwhere isnumeric(×Ö¶Î)=1
Ïà¹ØÎÊ´ð£º
ÓÐ沒ÓÐ辦·¨實現£¬從MSSQL2000Æó業¹ÜÀíÆ÷註冊MSSQL2008數據庫£¿
Á¬²»ÉÏ°É
òËÆ沒Ï£Íû¡£¡£¡£
Ó¦¸ÃÊDz»ÐÐµÄ ¿çÌ«¶àÁË
ÄÇ2000µÄ ......
ÔÚvbscriptÖв»ÓÃon error resume nextÈçºÎÅжÏmssqlÓï·¨´íÎó£¡
TRY CATCH?
»òÕßʹÓÃÁ÷³Ì¿ØÖÆÓï¾ä
if
else
²»ÓÃon error ÓÃÄǸöÎҾͲ»ÐèÒªÔÚÕâÀïÑ°ÕÒ´ð°¸
ÒýÓÃ
²»ÓÃon error ÓÃÄǸöÎҾͲ»Ðè ......
±íµÄ½á¹¹ÈçÏ£º
±í1£ºtb_big
×ֶΣºfalseid Öµ£º1£¬2£¬
×ֶΣºbigtype Öµ£ºA£¬B£¨ÓëfalseidµÄÖµµÄλÖÃÒ»Ò»¶ÔÓ¦£¬¼´1¶ÔÓ¦A£¬2¶ÔÓ¦B£©
±í2£ºtb_small
×ֶΣºfalseid£¨Óëtb_bigµÄfalseid_1¹ØÁªµ ......
´æ´¢¹ý³ÌÊÇÕâôдµÄ£¬
Declare @id int
BEGIN TRANSACTION
Insert into xxxxxTable(f1,f2)values(@a,@b)
Select @id=@@identit ......