title: TRIGGERs that cause INSERTs to fail? Possible?
body: <p>In cleaning up <a href="https://stackoverflow.com/questions/229447/how-to-create-a-two-sided-unique-index-on-two-fields#229521">this answer</a> I learnt a bit about <code>TRIGGER</code>s and stored procedures in MySQL, but was stunned that, while <code>BEFORE INSERT</code> and <code>BEFORE UPDATE</code> triggers could modify data, they seemingly couldn't cause the insert/update to fail (ie. validation). In this particular case I was able to get this to work by manipulating the data in such a way as to cause a primary key duplicate, which in this particular case made sense, but doesn't necessarily make sense in a general sense.</p>
  
  <p>Is this sort of functionality possible in MySQL? In any other RDBMS (my experience is limited to MySQL sadly)? Perhaps a <code>THROW EXCEPTION</code> style syntax?</p>