Accessing openmrs database tables

Can anyone help give a hint on how to access the appointment table on openmrs database. I am trying to fetch the scheduled appointments from another module.

You will access that data through the Appointment Module service. The following two wiki pages should help:

Thank you pascal.