Lỗi SQL/Cơ sở dữ liệuLỗi
4270442704 — Undefined Object
The specified database object (type, operator, function) does not exist.
postgresql
Xem chi tiết 23505An INSERT or UPDATE violates a unique constraint or primary key.
The value already exists in a column with a UNIQUE constraint or PRIMARY KEY.
Use INSERT ... ON CONFLICT (PostgreSQL) or ON DUPLICATE KEY UPDATE (MySQL). Check for duplicates before inserting.
-- unique_violation
INSERT INTO users (email) VALUES ('dup@test.com');
-- Fix: use ON CONFLICT
INSERT INTO users (email) VALUES ('dup@test.com')
ON CONFLICT (email) DO UPDATE SET updated_at = NOW();42704The specified database object (type, operator, function) does not exist.
SQLITE_RANGE (25)A parameter index passed to sqlite3_bind is out of range.
08003The specified database connection does not exist or has been closed.
MySQL 1406The data value exceeds the column's maximum length.
22007A date, time, or timestamp value is in an invalid format.
55P03The requested lock could not be acquired without waiting.