What is the purpose of "OR IGNORE" in the following SQL:
INSERT OR IGNORE INTO Course (title) VALUES ( ? ) a. It makes sure that if a particular title is already in the table, there are no duplicate rows inserted b. It ignores errors in the SQL syntax for the statement c. It updates the created_at value if the title already exists in the table d. It ignores any foreign key constraint errors
The ON CONFLICT clause applies to UNIQUE, NOT NULL, CHECK, and PRIMARY KEY constraints. The ON CONFLICT algorithm does not apply to FOREIGN KEY constraints.
What is the purpose of "OR IGNORE" in the following SQL:
INSERT OR IGNORE INTO Course (title) VALUES ( ? )a. It makes sure that if a particular title is already in the table, there are no duplicate rows inserted
b. It ignores errors in the SQL syntax for the statement
c. It updates the created_at value if the title already exists in the table
d. It ignores any foreign key constraint errors
#sqlite #bazydanych #pytanie #ankieta
Pytanie wyżej bo wykopowe ankiety to żart.
uniqueto będą duplikatyForeign key constraint violated: Referenced row exists.