Many software applications produced today have a component, of lesser or greater importance to the structure, that is based on database management systems. What is more, this information is generally handled through SQL queries embedded in the application code. On the other hand, automatic software testing is normally associated with the testing of programs implemented in imperative and structured languages. The problem arises when it comes to unifying software tests in programs that manage databases using SQL. The aim of this paper is to get closer to a measurement of the coverage of SQL statements and to show how, using this measurement, we might change the testing databases by means of completing or deleting information which provides improvements to the measurement, in order to achieve the highest possible percentage of coverage of the statements which have access to the database.