On 29 Feb 2012, at 10:46am, hsymington <i...@hamishsymington.com> wrote:

> CREATE TRIGGER UpdateSaleItemDescription BEFORE INSERT ON SaleItem
> BEGIN
> SET NEW.SaleItem_Description='Fish';
> END;
> 
> [snip]
> Is it correct that I can't do the first, or am I misreading the syntax? 

Yes.  You can look at values using 'new.' but you cannot change them.  However, 
you do not need to.  To perform such an operation as you list above simply 
define a default value for the SaleItem_Description column.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to