You are here

CASE - command

Error message

Notice: unserialize(): Error at offset 1842 of 1865 bytes in variable_initialize() (line 1202 of /is/htdocs/wp1033310_AQAMEFYCW9/www/includes/bootstrap.inc).

Syntax

Description

    With CASE you can proceed data in relation to other data.

    Example:

SELECT knum, kname,
CASE
  WHEN stadt <> 'Berlin'
  THEN LEFT('Das ist ein Nichtberliner, der sehr schlecht ist...',40)
  ELSE stadt
END berlin_ja_nein
FROM tkunden
WHERE rating>1;

Here are selectted all customers, where rating is bigger than 1, and only between curtomers living in Berlin and the others is made a difference.

Error | AAM

Error

The website encountered an unexpected error. Please try again later.