Review & Update SQL
Review and update pre-existing SQL before using it in your database.
SQL Mocker breaks an existing script into its returned columns, source tables, and relationships, making complex SQL easier to inspect and update without editing it line by line.
See the current output
Use Output Columns to see every field returned by the query and the table or expression it comes from.
Remove or hide fields
Remove unnecessary result columns, while hiding fields that must remain available for joins, filters, grouping, or sorting.
Extend the query
Use Add from Database to bring in metadata for another table, select the fields you need, and confirm how it connects.
Connected review workflow
Break down the output, then update the schema behind the query
Output Columns and Review Schema and Update SQL work together. Start with the result structure, make precise schema-level changes, then return to Output Columns to verify the updated query.
Output Columns
See the query as a clear list of returned fields instead of tracing the SELECT statement and its expressions manually.
- Review every output column in the order it is returned.
- See the source table and source column where they can be inferred.
- Inspect calculated expressions and aliased output fields.
- Use the view before and after changes to confirm the final result structure.
Review Schema and Update SQL
Open a schema overview derived from the uploaded SQL and make controlled changes to the tables and columns used by the script.
- Remove columns that are no longer needed by the result or query.
- Hide required join, filter, grouping, or sorting fields from the final output.
- Select Add from Database to request metadata for another table.
- Review the imported columns and relationship before applying the updated SQL.
You can still ask the assistant to adjust the SQL through chat. Output Columns and Review Schema and Update SQL provide the more visual workflow when you want to inspect and control the result structure directly.
Review Schema workflow
Review the result structure before and after each change
- 1Open Output Columns to see every returned column and its source table.
- 2Open Review Schema and Update SQL, then remove output fields you no longer need.
- 3Hide fields required for joins, filters, grouping, or sorting so they remain in the query but not the final results.
- 4To extend the query, select Add from Database. Run the generated metadata script in your own database, return the results to SQL Mocker, then review the new columns and relationship.
- 5Apply the changes and use Output Columns again to verify the final result before running the SQL in your database.
No direct database connection
Review SQL without exposing production data or database credentials.
SQL Mocker can break down and update the imported SQL without access to your live database. When you use Add from Database, you run the metadata script yourself and return only the resulting table structure to the workspace.
Database credentials and production rows are not required. You remain responsible for reviewing and validating the final query in your own environment.
Review and update SQL FAQ
What does Output Columns show?
It lists each field returned by the imported SQL, including its output name, likely source table and column, and the underlying expression where available.
Why can some columns be hidden but not deleted?
A column used by a join, filter, grouping, or sort may still be required by the query. Hiding it removes it from the final results while preserving the SQL logic that depends on it.
Can I add another table to the imported SQL?
Yes. Select Add from Database, run the generated metadata script in your own database, and return the results. You can review the new columns and confirm the relationship before SQL Mocker updates the query.
Does Add from Database create a live connection?
No. You run the extraction script yourself. SQL Mocker receives the metadata results you provide, not database credentials or direct access to production data.