Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

If Then Else

Mathias Rangel Wulff edited this pageJun 13, 2015 ·4 revisions

KeywordIF ... THEN ... ELSE

Syntax:

    IF expression THEN statement1 [ELSE statement2]

For example:

    IF EXISTS(SELECT*FROM oneWHERE a=10)UPDATE oneSET b=200WHERE a=10    ELSEINSERT INTO oneVALUES (5,500);

Try this AlaSQL examplein jsFiddle.

See also:CASE

© 2014-2026,Andrey Gershun &Mathias Rangel Wulff

Please help improve the documentation by opening a PR on thewiki repo

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp