Databases & SQL vocabulary · SQL Statements and Queries

CTE

Meaning in databases & SQL, with examples

/ˌsiː tiː ˈiː/abbreviationCommon term

In databases & SQL, CTE means: Common table expression: a named temporary result defined with WITH at the start of a query, which the main query can then use like a table.

In Turkish: ortak tablo ifadesi, CTE

How it is used

CTEs make long queries readable by splitting them into named steps. A recursive CTE (WITH RECURSIVE in PostgreSQL and MySQL) can walk tree data such as category hierarchies or org charts. Developers often say 'pull that out into a CTE'.

Example sentences

  1. I moved the monthly totals into a CTE so the final SELECT is easier to read.

  2. A recursive CTE returns the whole category tree in one query.

Common collocations

  • WITH clause
  • recursive CTE
  • use a CTE
  • chain CTEs

This word in other fields

The same English word can have a different meaning in another field:

More terms: SQL Statements and Queries

Practise with graded reading

Reading at the right level is the fastest way to make new words stick. Pick free English books by level: