Hi,

sqlite does not enforce datatypes. In this, sqlites works differently 
from other database engines.

See http://www.sqlite.org/different.html and search for "*Manifest typing"
The key sentence is
*"SQLite thus allows the user to store any value of any datatype into 
any column regardless of the declared type of that column."

See also http://www.sqlite.org/datatype3.html

Martin

REPKA_Maxime_NeufBox wrote:
> Hello,
> I am working on Database not for a long time. From SQLITE Tutorial exam
> table :*
>
> ->> Why is it possible to change data not defined in the constraint :
> Exemple : enter TEXT if the column is INTERGER ??
>                  enter 25 caracters if column is declared VARCHAR(15) ??
> I thought i will get an error return
> See exemple below :
>
> sqlite> pragma table_info('exam');
>     0|ekey|INTEGER|0||1
>     1|fn|VARCHAR(15)|0||0
>     2|ln|VARCHAR(30)|0||0
>     3|exam|INTEGER|0||0
>     4|score|DOUBLE|0||0
>     5|timeEnter|DATE|0||0
>
> sqlite> select * from exam;
>     1|Bob|Anderson|1|75.0|2009-02-24 09:41:04
>     2|Bob|Anderson|2|82.0|2009-02-24 10:11:45
>
> sqlite> UPDATE main.'exam' SET fn='Bob12345678901234567890' WHERE ekey =
> '1';
> sqlite> UPDATE main.'exam' SET exam='NN' WHERE ekey = '1';
> sqlite> select * from exam;
> 1|Bob12345678901234567890|Anderson|NN|75.0|2009-02-24 09:41:04
> 2|Bob|Anderson|2|82.0|2009-02-24 10:11:45
> sqlite>
>
> Sincères salutations
> Maxime REPKA
> Tel : 02.31.34.75.65
> MailTo:repka.max...@neuf.fr
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>   
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to