title: Is it possible in DB2 or in any Database to detect if the table is locked or not?
body: <p>Is it possible in DB2 to detect if the table is locked or not. Actually whenever we use Select statement and if that table is locked [ may be because of on going execution of insertion or deletion ] , then we have to wait till the table is unlocked. </p>
  
  <p>In our application sometimes it goes to even 2-3 mins. What i think is, if i can have some mechanism by which i can detect the locked table, then i will not even try to fetch the records, instead i will splash some message.</p>
  
  <p><strong><em>Not only in DB2, but is it possible to detect this in any Database.</em></strong></p>