On Wed, Sep 14, 2011 at 02:55:06PM -0400, Magnus Thor Torfason scratched on the 
wall:
> I have this database of employees. A simple select looks like this:
 

> Now, I get a list of the jobs, and a random selection of employees.
> I would have expected an error here. Of course, my actual query was
> different (this is based on the Oracle example data base from very
> old days), but it was also much more complicated, so I did not
> notice the error until a bit of fishing around. So getting an
> explicit error here would have made things simpler.
> 
> Is there a way to do that? "PRAGMA strict" was one thing I thought
> about looking for, but I did not find any such pragma.

  As other have said, I'm not aware of anyway to force an error.

  Most RDBMS systems will throw an error if you don't group or
  aggregate column references, but SQLite trust you to know what you're
  doing.  Personally I've always found this to be very useful, as I
  often have queries that lead to great frustation on other systems.
  When I know a computed column or something similar is unique (or
  unique enough, such as only caps differences), it is nice to be
  able to keep the groupings simple. 

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to