diff --git a/docs/features/connection-window.mdx b/docs/features/connection-window.mdx index d51b655799..fa137208ad 100644 --- a/docs/features/connection-window.mdx +++ b/docs/features/connection-window.mdx @@ -130,7 +130,7 @@ To take an object out, choose **Remove from Folder**, or drag it onto its **Tabl The filter field reaches inside folders. A folder holding a match opens to show it, and a folder without one is hidden until the field is cleared. -Renaming or dropping a table from the sidebar keeps its folder in step. SQL run in the editor does not: a table renamed with `RENAME TABLE` drops out of its folder, so file it again under its new name. +Renaming or dropping a table keeps its folder in step, whether you do it from the sidebar or with SQL as [Drop or rename with SQL](/features/table-operations#drop-or-rename-with-sql) describes. A renamed table stays filed under its new name, and a dropped one leaves the folder. ## The trailing pane diff --git a/docs/features/import-export.mdx b/docs/features/import-export.mdx index 2369d01198..cf78a67f1c 100644 --- a/docs/features/import-export.mdx +++ b/docs/features/import-export.mdx @@ -384,7 +384,7 @@ Every field in the file gets a row with a checkbox and a column menu. A field na Clicking **Import** saves each choice that differs from Match by Name for that table, whether the import succeeds or not. The next file imported into the same table starts from those choices, and the sheet reads **Restored the mapping saved for** and the table name. A saved column the table no longer has falls back to the name match. Importing into a new table saves any column you renamed, so the same file lands on the renamed columns next time. -Saved mappings stay on this Mac. They follow a table renamed from the sidebar, and are forgotten when the table is dropped from the sidebar or the connection is deleted. A `DROP TABLE` run in the SQL editor leaves them in place, so a table created again under the same name starts from the old mapping. +Saved mappings stay on this Mac. They follow a renamed table and are forgotten when the table is dropped, from the sidebar or with SQL as [Drop or rename with SQL](/features/table-operations#drop-or-rename-with-sql) describes, and when the connection is deleted. ### Row imports diff --git a/docs/features/table-operations.mdx b/docs/features/table-operations.mdx index aed79933f6..498bcd0bbc 100644 --- a/docs/features/table-operations.mdx +++ b/docs/features/table-operations.mdx @@ -69,7 +69,7 @@ No other engine has a rename, so the item never appears on Cassandra, DynamoDB, ## Drop or rename with SQL -A `DROP TABLE`, `DROP VIEW`, `ALTER TABLE ... RENAME TO`, `RENAME TABLE` or SQL Server `sp_rename` run in a query tab, or by an MCP client, counts as a sidebar drop or rename once it commits. Tabs on the table close or take the new name, and its saved filters, column layout, highlight rules, value formats, favorite and Recent entry go with it. A drop that is rolled back leaves all of them in place. So does every drop in a run that ends inside a transaction, every drop on a SQL Server session with `IMPLICIT_TRANSACTIONS` on, and every drop in a SQL Server script that uses `IF`, `WHILE`, `GOTO`, `RETURN` or `TRY...CATCH`. A SQL file run through **Import Data**, or a restored backup, refreshes the sidebar and keeps every table's settings. +A `DROP TABLE`, `DROP VIEW`, `ALTER TABLE ... RENAME TO`, `RENAME TABLE` or SQL Server `sp_rename` run in a query tab, or by an MCP client, counts as a sidebar drop or rename once it commits. Tabs on the table close or take the new name, and its saved filters, column layout, highlight rules, value formats, foreign key label columns, folder, saved import mapping, favorite and Recent entry go with it. A drop that is rolled back leaves all of them in place. So does every drop in a run that ends inside a transaction, every drop on a SQL Server session with `IMPLICIT_TRANSACTIONS` on, and every drop in a SQL Server script that uses `IF`, `WHILE`, `GOTO`, `RETURN` or `TRY...CATCH`. A SQL file run through **Import Data**, or a restored backup, refreshes the sidebar and keeps every table's settings. This works on MySQL, MariaDB, PostgreSQL, Redshift, SQLite, SQL Server, Oracle, ClickHouse and DuckDB. On PostgreSQL, Redshift and SQL Server, name the schema, as in `public.orders`, and on DuckDB the database and the schema, because a bare name there resolves through session state such as the search path or the login's default schema. On the other engines a name stops being followed once something on the connection could have redirected it: a temporary table of the same name, a procedure call or anonymous block, or a statement that changes the current schema, whether it ran in a query tab, in the connection's **Startup Commands** or in an imported SQL file. A rename written with `IF EXISTS` is never followed, since it succeeds when there was nothing to rename.