> Hi All!
>
> I have created a table in sqlite.Upto my knowledge a column which is
> declared as primary key will not accept null and even if I don't give any
> value to that field an error occurs that violating the constraint
>
> For Example
>
> Create table emp(empno integer PRIMARY KEY,...,...)
>
> . Even if I give u a NULL as a value to the field that is declared
> as primary key .it is accepting
>
> . Even if I Don't give any value to the field that is declared as
> primary key it is auto incrementing. Instead of showing the error
> constraint violated it is auto increment that field value(I did not specify
> the
> column to auto increment).
>
>
Satish,
If you don't want the magical autoincrement feature try defining your
table using an alternate syntax:
create table emp (
empno integer not null,
...
primary key (empno)
) ;
Cheers,
Rob Sciuk
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users