Hi 

I'm new to SQLite and triggers.  Is it possible to set a trigger so it
updates a field of a new record in a table to the same value as the
Autoincrement field.

i.e.

Field1, Integer Autoincrement
Field2, Integer
Field3, Text
Field4, Text

When the user enters text in Field3 & Field4, Field1 is auto-populated. 
When the new record is saved, I would like the trigger to set Field2 to be
the same as Field1.  I have no idea how to set the syntax to do this.

Also, is it possible to have an autoincrement field in SQLite that is not a
primary key?

Thanks
bb



-- 
View this message in context: 
http://www.nabble.com/SQLite---Upade-trigger-tp20648718p20648718.html
Sent from the SQLite mailing list archive at Nabble.com.

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

Reply via email to