Search
 
SCRIPT & CODE EXAMPLE
 

SQL

if else in mysql stored procedure

-- PL/SQL
BEGIN
    IF my_val = 1 THEN [...]
    ELSE [...]
    END IF;
END;
-- In a query
SELECT CASE WHEN my_col = 1 THEN 'Ok' ELSE 'Ko' END AS my_result;
Comment

PREVIOUS NEXT
Code Example
Sql :: json_value oracle 
Sql :: Add colum sqlite table 
Sql :: mysql on duplicate key ignore 
Sql :: mysql if else 
Sql :: ERROR 1064 (42000) 
Sql :: mysql timestamp vs datetime 
Sql :: oracle list days between two dates 
Sql :: mysql select or insert current datetime 
Sql :: add week ending date sql server 
Sql :: how to define a save method in ruby for sqlite3 databases 
Sql :: postgresql newline character 
Sql :: homebrew install mysql 
Sql :: from . import _mysql ImportError: libmariadb.so.3: cannot open shared object file: No such file or directory linux 
Sql :: sql select all tables from database change url 
Sql :: rand mysql 
Sql :: sql order by number not ordered 
Sql :: sql default value if null 
Sql :: how to find 2nd highest salary in a table 
Sql :: choose only one for each distinct collumn regardless of other columns 
Sql :: sqrt(i) 
Sql :: mysql 5.6 hierarchical recursive query 
Sql :: how to get column name in db from an sqlalchemy attribute model 
Sql :: SQL Server run query on linked server 
Sql :: sqlite update query python 
Sql :: mysql order by on condition 
Sql :: date format in oracle 
Sql :: mysql pad zeros 
Sql :: sql float 3 decimal places 
Sql :: grant select mysql 
Sql :: subquery in mysql 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =