1
0

rename.asciidoc 473 B

1234567891011121314151617181920212223242526
  1. [[esql-rename]]
  2. === `RENAME`
  3. Use `RENAME` to rename a column using the following syntax:
  4. [source,esql]
  5. ----
  6. RENAME <new-name> = <old-name>
  7. ----
  8. For example:
  9. [source,esql]
  10. ----
  11. include::{esql-specs}/docs.csv-spec[tag=rename]
  12. ----
  13. If a column with the new name already exists, it will be replaced by the new
  14. column.
  15. Multiple columns can be renamed with a single `RENAME` command:
  16. [source,esql]
  17. ----
  18. include::{esql-specs}/docs.csv-spec[tag=renameMultipleColumns]
  19. ----