新的SQL SERVER 2005比2000在修改了不少的特性,SQL 中的对错误处理使用了和VS.NET一样的结构:
Begin try
select * from person.address where rownum>1
End try
Begin Catch
print ERROR_NUMBER()
End Catch
Error:
Msg 207, Level 16, State 1, Line 2
Invalid column name 'rownum'.
SQL 正式变成MS-SQL (名字是我起的)
:)
------Microlong
浙公网安备 33010602011771号