Using SQL tab
Procedure
- Right-click a table in the Workspaces view and select
Open With > Table
Editor. The table opens in the editor window.
- Click the SQL tab.
The SQL tab opens displaying the SQL query that fetches the table displayed in the Results tab.
- Specify the row conditions that will be used to filter the query results:
- Use the
WHERE
clause to specify the filter conditions. - Use the
AND
,OR
orNOT
operators to combine multiple filter conditions.
For example:
SELECT [Columns] FROM [Table_Name] WHERE [Condition1] AND [Condition2] AND [Condition2]...
Note: Consider the following when specifying an SQL query in the SQL tab:- Use an SQL query to fetch the contents of a single table only. You will not be able to use the Table Editor to update the resultant table if you query more than one table in your SQL queries. Use separate table editors to query and update tables individually.
- Ensure that the SQL query that you specify fetches all the columns of the table. If all the columns of a table are not included in the result set, you may not be able to effectively use the Table Editor to update the table. You may encounter errors when you try to insert new rows into such tables. Therefore, it is recommended to avoid introducing new columns or omitting existing columns in the SQL query. Because joins, aggregate functions, and calculated columns may introduce new columns or omit existing columns, it is recommended to avoid them as well.
- It is not recommended to change the attributes of a table, such as table name and column name, using an SQL query. This action impacts the functioning of other saved objects in Table Editor.
- Use the
- Click the Run Query icon on the toolbar. The query results are displayed in the Results tab.