---
title: "Rails 5 makes sql statements even more colorful"
description:
  "This new coloration approach makes it easier to scan the rails console for
  specific types of SQL activity"
canonical_url: "https://www.bigbinary.com/blog/rails-5-makes-sql-statements-even-more-colorful"
markdown_url: "https://www.bigbinary.com/blog/rails-5-makes-sql-statements-even-more-colorful.md"
---

# Rails 5 makes sql statements even more colorful

This new coloration approach makes it easier to scan the rails console for
specific types of SQL activity

- Author: Abhishek Jain
- Published: June 27, 2016
- Categories: Rails 5, Rails

In Rails 5, SQL statements have
[much more granular level of coloration](https://github.com/rails/rails/pull/20607)
.

### INSERT statement

Font color for `INSERT` command is green

![insert statement in green color](https://www.bigbinary.com/blog/images/images_used_in_blog/2016/rails-5-makes-sql-statements-even-more-colorful/insert-coloration.png)

### UPDATE and SELECT statement

Font color for `UPDATE` command is yellow and for `SELECT` it is blue.

![update statement in yellow color](https://www.bigbinary.com/blog/images/images_used_in_blog/2016/rails-5-makes-sql-statements-even-more-colorful/update-coloration.png)

### DELETE statement

Font color for `DELETE` command is red.

![delete statement in red color](https://www.bigbinary.com/blog/images/images_used_in_blog/2016/rails-5-makes-sql-statements-even-more-colorful/delete-coloration.png)

As you might have noticed from above that font color for `transaction` is cyan.

### Rollback statement

Font color for `Rollback transaction` is red.

![rollback statement in red color](https://www.bigbinary.com/blog/images/images_used_in_blog/2016/rails-5-makes-sql-statements-even-more-colorful/rollback-coloration.png)

### Other statements

For [custom SQL statements color](https://github.com/rails/rails/pull/20921) is
magenta and Model Load/exists color is cyan.

![magenta](https://www.bigbinary.com/blog/images/images_used_in_blog/2016/rails-5-makes-sql-statements-even-more-colorful/misc-coloration.png)

## Links

- [Human page](https://www.bigbinary.com/blog/rails-5-makes-sql-statements-even-more-colorful)
