You can use an
SQL DDL or DML statement to find tables
and columns in the SQL statements in your applications. You might
want to conduct this type of search if, for example, you need to know
how changes to tables and columns might affect an application.
Before you begin
The Java™ code
in which the SQL statements appear must be part of a Java project that is enabled for development
with pureQuery.
About this task
You can use most DML statements, including SELECT statements.
You
can use the following types of DDL statements:
- ALTER
TABLE ADD COLUMN
- Use this type of statement to find where
the table to be modified
is used in an application.
- ALTER TABLE
DROP COLUMN
- Use this type of statement to find where the column
to be dropped
is used in an application.
- ALTER TABLE
RENAME COLUMN
- Use this type of statement to find where the
column to be renamed
is used in an application.
- DROP TABLE
- Use this type of statement to find where the table to be dropped
is used in an application.
Procedure
To use a DDL
or DML statement to find SQL statements
that refer to particular tables and columns:
- In the SQL editor or the Java editor,
highlight the DDL or DML statement that you want to use.
- Right-click the statement and select Find Reference
in SQL Outline.
Results
The workbench filters the content of the SQL
Outline view to show only those SQL statements that refer to the database
objects that you are interested in.
At the top of the view appears
a line that describes the current filter. If you want to remove the
filter, click this button at the top of the view: 