oracl 和db2 常用语法比较: 1、取前N条记录 Oracle:Select * from TableName where rownum <= N; DB2:Select * from TableName fetch first N rows only; 2、取得系统日期 Oracle:Select sysdate from dual; DB2:Select current timestamp from sysibm.sysdummy1; 3、空值转换 Oracle:Select
举例说明自定义C++异常处理的实例
例1:自定义一个继承自excepton的异常类myException
C++标准中,定义在中的任何异常类都派生自exception Class,本例也只是简单地由exception继承,在try段抛出一个异常并捕捉。代码如下:
/*++ test.cpp
version:1.0
decript:define a exception class named myException
derived from base class exception