>
> The normal proper way to do what you said is to declare a table like this:
>
>   CREATE TABLE person (
>     person_id INT PRIMARY KEY,
>     name TEXT,
>     birthdate DATE
>   )
>
> In my example, you are using only the normal data, which is the 3 columns
> specified, and you are not referring to a column you didn't declare
> ("rowid" or whatever), but by a column you did declare, "person_id".
>
> By contrast, defining a table like this is inferior:
>
>   CREATE TABLE person (
>     name TEXT,
>     birthdate DATE
>   )
>
> In that example, the rowid would be generated and you can't use something
> externally meaningful (such as SSN) to distinguish one Joe from another.

I can use the generated rowid to link this table to another containing
meaningful data or I don't need other data besides the ones in this table.

I can use an explicitly defined rowid or the automatically generated one ...


> My point still stands.  Or my other point of adding a LIMIT clause to
> UPDATE also stands if you want to create tables the second way.

you can use LIMIT in UPDATE only if data isn't meaningful (in this case you
can habe only one row), otherwise ignoring the generated rowid would break
the db
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to