Case has two formats. Simple case function and case search function.--Simple case function when ' 1 ' then ' Male ' when ' 2 ' then ' women ' else ' other ' end--case search function case when sex = ' 1 ' Then ' man ' when
PL/SQL script language value assignment statement syntax table and record comply with the type usage, select the statement if else usage anonymous block (1), assign value statement syntax PL/SQL values use: = "=" some rules need to be observed in
CASE has two formats:The simple CASE function compares an expression with a group of simple expressions to determine the result.The CASE search function calculates a group of Boolean expressions to determine the result.Both formats support the
SQL statement-case when then else end, SQL-case
Output the following results based on the preceding table information:
The following are the database and table structure data:
create table DeptSales(deptID int,SubjMonth int ,sales int ,deptname
One of the SQL statement judgment methodsCase has two formats. Simple case functions and case search functions.-- Simple case FunctionCase sexWhen '1' then 'male'When '2' then 'female'Else 'others' end-- Case search functionCase when sex = '1' then '
The data SQL CASE expression is a generic conditional expression that resembles a if/else statement in another language.Case if condition then resultWhen condition then result.............[When ...][ELSE result]ENDThe case clause can be used where
MySQL is the most basic SQL syntax. For more information, see.
The most basic SQL syntax/Statement of MySQL. For more information, see.
DDL-Data Definition Language (Create, Alter, Drop, DECLARE)
DML-data manipulation language (Select, Delete,
MySQL's most basic SQL syntax/statementMySQL's most basic SQL syntax/statement, using MySQL friends can refer to below. ddl-Data Definition language (create,alter,drop,declare)dml-Data Manipulation Language (Select,delete,update,insert)dcl-Data
ddl-Data Definition language (create,alter,drop,declare)dml-Data Manipulation Language (Select,delete,update,insert)dcl-Data Control Language (Grant,revoke,commit,rollback)First, a brief introduction to the underlying statement:1. Description:
ddl-Data Definition language (create,alter,drop,declare)dml-Data Manipulation Language (Select,delete,update,insert)dcl-Data Control Language (Grant,revoke,commit,rollback)First, a brief introduction to the underlying statement:1. Description:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.