Re: Capturing the changes in columns in a table

Clemens Ladisch <clemens-P6GI/[email protected]>
Newsgroups gmane.comp.db.sqlite.general
Message-ID <[email protected]>
David Raymond wrote:
> My brain started yelling that that needed a "limit 1" on the subquery so that it would only return 1 row.
>
> How is that handled by other databases?

SQL-92 says:
|   6.11  <value expression>
|
|   General Rules
|
|   2) If a <value expression primary> is a <scalar subquery> and the
|      result of the <subquery> is empty, then the result of the <value
|      expression primary> is the null value.
|
|   7.11  <scalar subquery>, <row subquery>, and <table subquery>
|
|   General Rules
|
|   1) If the cardinality of a <scalar subquery> or a <row subquery> is
|      greater than 1, then an exception condition is raised: cardinal-
|      ity violation.

But SQL-92 has no easy way to limit the number of rows, and not even
trying to retrieve a second row might be easier to implement, so many
databases chose not to check for this error.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.