SQLite Forum

Difference on NULL when WITHOUT ROWID
Login
```
.version
create table a(
  id text primary key null
) without rowid;
insert into a values('whatever');
insert into a values(null);

create table b(
  id text primary key null
);
insert into b values('whatever');
insert into b values(null);
```

Both tables the same except for `WITHOUT ROWID` for table `a`.

I get following error for table `a` only.

```
SQLite 3.34.0 2020-12-01 20:57:24 1c7e6243ec89b4fa3599eaebbe1021bdca5b0359825e1ce582db1b1f92067fac
msvc-1800
Error: near line 6: NOT NULL constraint failed: a.id

```

Why do they behave differently when both are primary keys that accept nulls?