Hi to all!
I must do an insert into statement on a identity indexed table:
MSG_ID --> the identity (autoincrement)
MSG_DESCRI
MSG_PARENT --> the field i must fill
I must fill MSG_PARENT with a MSG_ID value, after the insert..
ex:
insert into MESSAGES (MSG_DESCRI,MSG_PARENT)
values ('hello world',identity value after insert)..
what's the best way to do this??
I must do this cause the first node of my tree must have MSG_PARENT = MSD_ID.. the root node..
in sql server i use a stored proc, i exec the insert and i use the @@identity sysvar... but my mysql version don't supports stored procedures..
can anyone help me??
thx!!!