I have one master table:
CREATE TABLE "LOGFILE"
(
"ID" Integer NOT NULL DEFAULT SERIAL (1),
"DESCR" Varchar (255) ASCII DEFAULT '',
PRIMARY KEY ("ID")
)
and 2 detail tables
CREATE TABLE "MSG_IN"
(
"ID" Integer NOT NULL DEFAULT SERIAL (1),
"LOGFILE_ID" Integer DEFAULT -1,
"MSG" Varchar (4096) BYTE,
PRIMARY KEY ("ID")
)
CREATE TABLE "REQ_IN"
(
"ID" Integer NOT NULL DEFAULT SERIAL (1),
"LOGFILE_ID" Integer DEFAULT -1,
"REQ" Varchar (4096) BYTE,
PRIMARY KEY ("ID")
)
When a new row is inserted into MSG_IN or REQ_IN, there is a trigger
which decodes MSG or REQ into decsription and adds one new row into table LOGFILE.
Inside this trigger I want to set collumn LOGFILE_ID into new inserted ID value of LOGFILE table.
Is it posible, to find out new inserted ID?
I think in MySql LAST_INSERT_ID () makes this.
Thank you for advice.
Regards, Dusan.
-- Dusan Kolesar Helsinska 19 040 13 Kosice Slovakia e-mail : [EMAIL PROTECTED] ICQ# : 160507424
-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
