> Sometimes, you know that the value of a particular column is in fact unique > across the group (in which case it doesn't matter which row it's taken from). > This knowledge could come from invariants being maintained that are not > perhaps formally captured in the database schema, or else flow from the > particular join and WHERE conditions. > > In such cases (which come up surprisingly often, in my experience), it's > convenient to be able to just use the column name. I also work with MySQL a > bit, which doesn't allow that, so you have to wrap the column name in min() > or max() (doesn't matter which, as all values are the same). Personally, I find > it annoying. It makes the database engine do unnecessary comparisons, thus > hurting performance (though I admit that the difference is likely to be > immeasurably small), and more importantly, it makes the statement more > verbose and difficult to read and understand. > > Now, if there were some kind of a PRAGMA that would turn this behavior off > and enforce stricter syntax rules, I wouldn't be against it. I'd likely just never > use it. Please feel free to try and convince SQLite developers (of which I'm > not) to add such a pragma (but don't expect me to pitch in for the cause). > -- > Igor Tandetnik
Ok, I see that. So its weighing the extra typing (and small performance gain) against the prevention of an error by a mistakenly left out column. Yeah, a pragma strict would be great. I can't be the only one who would rather make the queries more error proof. /Frank Missel _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users