79586

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, UPD
1.    Prirrt this page and color the shccp. Glue the page +o a thin piece ot car
Mailbox Arts and Crafts For All Seasons0 Space CreaturesMaterials for Each Chlld: 1 Container, such
PROMPT 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 PR
CREATE TABLE Ksiazka ( ID INT PRIMARY KEY, Tytuł VARCHAR(45), LiczbaStr tinyint, W_ID INT, CONSTRAIN
skanuj0315 (2) 330 PHP i MySQL dla każdego CREATE TABLE Autorzy( Id INTEGER PRIMARY KEY. Imię VARCHA
Suzuki RM125t CYLINDER, PISTON AND EXHAUST VALVE 6-1CYLINDER, PISTON AND EXHAUST VALVECONTENTS CONST
m85 andsword, that is the Select Fyrd and Hearth Troop respectively, and that all were normally mou
Content CREATE TABLE App.Settings ( SessionID int PRIMARY KEY, WindowSettings xml
Document CREATE TABLE App.Settings ( SessionID int PRIMARY KEY, WindowSettings xml
CONSTRUCTION OF THE WORKSHOP FOR PRODUCTION OF CLEAN, REFINED, HYDRATED AND DEODORIZED OIL
Document CREATE TABLE App.Settings ( SessionID int PRIMARY KEY, WindowSettings xml

więcej podobnych podstron