Hacker News new | ask | show | jobs
by Sean1708 2327 days ago
Nah, it's true for all columns:

  SQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 3 15:56:30 2020
  
  Copyright (c) 1982, 2013, Oracle.  All rights reserved.
  
  
  Connected to:
  Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
  
  SQL> create table foo(fook varchar2(10) not null);
  
  Table created.
  
  SQL> insert into foo values ('');
  insert into foo values ('')
                          *
  ERROR at line 1:
  ORA-01400: cannot insert NULL into ("SPORTSBOOK_DOCK"."FOO"."FOOK")
  
  
  SQL> create table bar(bark varchar2(10));
  
  Table created.
  
  SQL> insert into bar values ('');
  
  1 row created.
  
  SQL> insert into bar values ('a');
  
  1 row created.
  
  SQL> insert into bar values (null);
  
  1 row created.
  
  SQL> select * from bar;
  
  BARK
  ----------
  
  a
  
  
  SQL> select * from bar where bark = '';
  
  no rows selected