On 2015-09-14 09:04 PM, Petr L?z?ovsk? wrote:
> 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)
Thay track all of us and "optimalise" search results. My list of links could
differ from yours.
I have googled key phrase '"UNIQUE constraint failed:" sqlite primary key' and
similar, but not read whole received documents, perform only brief look on it.
This is best practice by my experience,
Hi Petr,
if you Google for "database table primary key" the first few results lead to
quite good explanations.
Also, the english wikipedia's article "Unique key" explains primary keys.
HTH
Martin
Am 14.09.2015 22:25 schrieb Petr L?z?ovsk? :
>
> I had googled to verify such idea before, but
I had googled to verify such idea before, but have no luck.
Thanks, L.
> 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
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 */
6 matches
Mail list logo