Refactorings that work in SQL files and schemas

DataGrip correctly resolves all references in your SQL code and helps you refactor them. When you rename a variable or an alias, it will update their usages throughout the entire file. The actual table names in the database are updated when you rename references to them from your queries. There is even a preview of usages of tables/views inside other views, stored procedures and functions.