---
title: "select"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:guide-function-select@main"
source: "Guide/TypoScriptFunctions/Select/Index.rst"
rendered: "2026-09-19T06:55:14+00:00"
---

# select {#guide-function-select}

The [select](https://docs.typo3.org/permalink/t3tsref:select@main) function generates a SQL SELECT query, which
is used to read records from the database. `select` automatically checks
whether the records might be "hidden", "deleted", or if they have a "start and
end date". If `pidInList` is used (meaning a list of pages is rendered),
the function also checks if the current user is allowed to see all records.

With the help of the select function, it is possible to show the content of a
page on all pages. For example:

**EXT:site_package/Configuration/Sets/Main/setup.typoscript**

```typoscript
temp.leftContent = CONTENT
temp.leftContent {

  table = tt_content
  select {

    # The page with ID = 123 is the source.
    pidInList = 123

    # Sorting is the same as in the backend.
    orderBy = sorting

    # Only select the content of the left column.
    where = {#colPos}=1

    # Define the field with the language ID in tt_content.
    languageField = sys_language_uid
  }
}

# Replace the mark ###LEFT### with the output of temp.leftContent.
marks.LEFT < temp.leftContent

```
