Hi Clark, Derby does not expose this information through a public api. After statement triggers may help you here.
Regards, -Rick On 3/31/11 5:23 PM, 鲍少明 wrote: > Thanks for Myrna's answer. But I am asking another function. > Currently, I am using Derby in the memory mode. > I need to know the table name list which has data changes during a > transaction. So I can export them into csv. > But there is not any information inside derby to tell me this update > history. So do I need to manually record the > table names which has really changed during a transaction? > > Thanks, > Clark > > 在 2011年3月18日 上午8:49,Myrna van Lunteren <[email protected] > <mailto:[email protected]>>写 道: > > 2011/3/17 鲍少明 <[email protected] <mailto:[email protected]>>: > > I have checked the system tables derby using. I don't find any > information > > table to track the modify time of the tables. So does it mean I > need to > > write some code to manually track it. And if it's roll-backed, I > need to > > clean it up? > > > > 2011/3/14 鲍少明 <[email protected] <mailto:[email protected]>> > >> > >> Hello group, > >> Is there any easy way to track the tables which have been > >> updated/deleted/inserted in one transaction? > >> I know that I can add some code in my db operation code to > track the > >> status. > >> But if I need to track some cascade delete or procedure call, I > will need > >> to write some ugly code to track them. > >> > >> Is there any easy way to get this done? Any suggestion will be > helpful. > >> > >> Thanks, > >> Clark Bao > > > > Derby manages all deletes/inserts/updates during a transaction, > including adding of tables...If something fails in the middle, the > entire transaction should get rolled back. > Have you found a situation where this didn't work as you expected? > Perhaps you need to look at your transaction logic... > Perhaps I'm misunderstanding the situation. > > Maybe all you want is to compare the contents of SYS.SYSTABLES for > your schema before and after the transaction? > > Perhaps you can find more of what you're looking for using the XPLAIN > functionality that was introduced in 10.6; see the Reference Guide > (http://db.apache.org/derby/docs/10.6/ref/ref-single.html) and/or > tuning guide > (http://db.apache.org/derby/docs/10.6/tuning/tuning-single.html). > > HTH, > Myrna > >
