登录 注册
当前位置:主页 > 资源下载 > 默认选项:SQL语言入门

默认选项:SQL语言入门

  • 更新:2024-07-07 11:41:38
  • 大小:5.26MB
  • 推荐:★★★★★
  • 来源:网友上传分享
  • 类别:Informix - 数据库
  • 格式:PPT

资源介绍

缺省选项 * … hiredate DATE DEFAULT SYSDATE, … 合法的值可以是一个直接的量、表达式、或者一个SQL函数. 缺省值的数据类型必须与列的数据类型匹配. 为某个列指定一个缺省值. * The DEFAULT Option A column can be given a default value by using the DEFAULT option. This option prevents null values from entering the columns if a row is inserted without a value for the column. The default value can be a literal, an expression, or a SQL function, such as SYSDATE and USER, but the value cannot be the name of another column or a pseudocolumn, such as NEXTVAL or CURRVAL. The default expression must match the datatype of the column. Instructor Note Here is an example for a pseudocolumn. For each row returned by a query, the ROWNUM pseudocolumn returns a number indicating the order in which Oracle server selects the row from a table or set of joined rows. The first row selected has a ROWNUM of 1, the second has 2, and so on.