You are viewing the archived documentation of TiDB, which no longer receives updates.View latest LTS version docs ↗
Sign InStart for Free
TiDB Self-Managed
Sign InStart for Free
TiDB Self-Managed
  • Introduction
  • Concepts
  • How-to
  • Reference
    • SQL
      • MySQL Compatibility
      • SQL Language Structure
      • Data Types
      • Functions and Operators
        • Function and Operator Reference
        • Type Conversion in Expression Evaluation
        • Operators
        • Control Flow Functions
        • String Functions
        • Numeric Functions and Operators
        • Date and Time Functions
        • Bit Functions and Operators
        • Cast Functions and Operators
        • Encryption and Compression Functions
        • Information Functions
        • JSON Functions
        • Aggregate (GROUP BY) Functions
        • Miscellaneous Functions
        • Precision Math
      • SQL Statements
      • Constraints
      • Generated Columns
      • Character Set
    • Configuration
    • Security
    • Transactions
    • System Databases
    • Errors Codes
    • Supported Client Drivers
    • Garbage Collection (GC)
    • Performance
    • Key Monitoring Metrics
    • Alert Rules
    • Best Practices
    • TiSpark
    • TiDB Binlog
    • Tools
  • FAQs
  • Support
  • Contribute
  • Releases
  • Glossary

Control Flow Functions

NameDescription
CASECase operator
IF()If/else construct
IFNULL()Null if/else construct
NULLIF()Return NULL if expr1 = expr2
Product
Product Overview
TiDB Cloud
TiDB Self-Managed
Pricing
Ecosystem
Integrations
TiKV
TiFlash
OSS Insight
Resources
Blog
Articles
Events & Webinars
Docs
Developer Guide
FAQs
Support
llms.txt
Company
About Us
News
Careers
Contact Us
Partners
Trust Hub
Security
Release Support
Brand Guidelines
Stay Connected
© 2026 PingCAP. All Rights Reserved.
/
Privacy Policy
/
Legal