79586
primary key and unique lndex Constraints
Normally, errors occurs for data-change statements (such as insert or update) that would violate
primary-key, unique-key, or foreign-key constraints. If you are using a transactional storage engine
such as innoDB, MySQL automatically rolls back the statement. If you are using a nontransactional
storage engine, MySQL stops processing the statement at the rowfor
which the error occurred and
leaves any remaining rows unprocessed.
MySQL supports an ignore keyword for insert, update, and so forth. If you use it, MySQL ignores
primary-key or unique-key violations and continues processing with the next row. See the section for
the statement that you are using (Section 13.2.5, “insert Syntax”, Section 13.2.11, “UPDATE Syntax", and so forth).
You can get information about the number of rows actually inserted or updated with the
mysąl info () C API function. You can also use the SHOW WARNINGS statement. See
Section 22.8.7.35, “mysql_info () ”, and Section 13.7.5.41, “show WARNIngs Syntax".
Currently, only InnoDB tables support foreign keys. See Section 5.4.5,
“InnoDB and FOREIGN KEY Constraints”.
Wyszukiwarka
Podobne podstrony:
Statements that are unsafe for SBR. Not all statements which modify data (such as INSERT DELETE, UPD1. Prirrt this page and color the shccp. Glue the page +o a thin piece ot carMailbox Arts and Crafts For All Seasons0 Space CreaturesMaterials for Each Chlld: 1 Container, suchPROMPT Creating Primary Key on ALTER TABLE WETERYNARZE ADD (CONSTRAINT WET_PK(KIE ID))/ PROMPT Creating Primary Key on PORCJE ALTER TABLE PORCJE ADD (CONSTRAINT POR_PK PRCREATE TABLE Ksiazka ( ID INT PRIMARY KEY, Tytuł VARCHAR(45), LiczbaStr tinyint, W_ID INT, CONSTRAINskanuj0315 (2) 330 PHP i MySQL dla każdego CREATE TABLE Autorzy( Id INTEGER PRIMARY KEY. Imię VARCHASuzuki RM125t CYLINDER, PISTON AND EXHAUST VALVE 6-1CYLINDER, PISTON AND EXHAUST VALVECONTENTS CONSTm85 andsword, that is the Select Fyrd and Hearth Troop respectively, and that all were normally mouContent CREATE TABLE App.Settings ( SessionID int PRIMARY KEY, WindowSettings xmlDocument CREATE TABLE App.Settings ( SessionID int PRIMARY KEY, WindowSettings xmlCONSTRUCTION OF THE WORKSHOP FOR PRODUCTION OF CLEAN, REFINED, HYDRATED AND DEODORIZED OILDocument CREATE TABLE App.Settings ( SessionID int PRIMARY KEY, WindowSettings xmlwięcej podobnych podstron