You can use System Information to display the table and field names for a window that you are viewing in SAP Business One.
First you toggle on the functionality from the View menu. The short cut key is Control plus Shift plus I.
Next, open a document or window in SAP Business One. In our example here we have opened the Business Partner Master Data window.
Now, when you move your mouse over a field (for example the Code), the second line of the status bar at the bottom of the screen shows the name of the table (OCRD) and the field name from the table (CardCode).
You now have the table name and field name to enter in your SQL query.
Other information about the field is displayed, such as the maximum number of characters in the field.