ITPub博客

首页 > 数据库 > Oracle > The different between NULL and ''

The different between NULL and ''

原创 Oracle 作者:YoungEric 时间:2008-04-10 19:22:49 0 删除 编辑

We can insert NULL into a column of a table.
There are two examples,let's see the difference.
1、INSERT INTO table_name VALUES( id,NULL);
This method inserts NULL to a column of the table.
2、INSERT INTO table_name VALUES( id,'');
This method doesn't insert NULL into the column ofthe table,
because '' is a valid value,though it is a empty string.

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10484922/viewspace-1002257/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-18

  • 博文量
    79
  • 访问量
    213595