Hello Petr, defining the column pid as INTEGER PRIMARY KEY you added an implicit contraint; a primary key means that only one record with a given value of pid can exist in the table. See https://www.sqlite.org/lang_createtable.html#rowid
Martin Am 14.09.2015 um 21:04 schrieb Petr L?z?ovsk?: > Have following table: > > CREATE TABLE ip_addr > ( > /*! Person identificator (PID) %%a */ pid INTEGER PRIMARY KEY NOT NULL, > /*! IP address %%b */ ip_addr VARCHAR (16) NOT NULL, > /*! Status: 0 - Allowed, Unassigned to specific customer (blocked) */ > /*! Status: 1 - Allowed, Asigned to concrete customer */ > /*! Status: 2 - Disallowed, Assigned to blocked user */ > /*! Status: 3 - Disallowed, Assigned to history user */ > /*! Status of IP address %%c */ ip_status INTEGER NOT NULL, > /*! Type: 1 - Private */ > /*! Type: 2 - Public */ > /*! Type: 3 - IPv6 */ > /*! Type of IP address %%d */ ip_type INTEGER NOT NULL, > /*! Date of blocking %%e */ blocked_at INTEGER, > /*! Blocking note %%f */ blocking_note VARCHAR > ); > ) > > > If inserting row containing PID already exist in table, sqlite generate > %subj% error. But there is not such constraint in database definition. Did I > miss something? > > L. > > > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users