$ sqlite3
SQLite version 3.37.2 2022-01-06 13:25:41
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> CREATE TABLE user (
id INTEGER PRIMARY KEY,
username TEXT UNIQUE,
usertg TEXT UNIQUE,
name TEXT UNIQUE
);
sqlite> insert into user (name) values ('test');
sqlite> insert into user (name) values ('test');
Error: stepping, UNIQUE constraint failed: user.name (19)
sqlite> insert or ignore into user (name) values ('test');
sqlite> insert or ignore into user (name) values ('test');
sqlite> insert or ignore into user (name) values ('test');
sqlite> select count(*) from user;
1
sqlite>