Originally posted by omran
However, suppose that I do COMMIT then I decide to unlock the table what should I do?
Once you do COMMIT all your locks are released, so the table is no longer locked. So you can't "decide to unlock the table", it is already unlocked.

You can never explicitely unlock the tables you have locked - it can be done only implicitly by COMMIT or ROLLBACK. There is no third way.