mysql case when or

Solutions on MaxInterview for mysql case when or by the best coders in the world

showing results for - "mysql case when or"
Nicola
06 Jun 2016
1SELECT CASE lower(col1)
2	WHEN 'agree' THEN 'Ok'
3	WHEN 'disagree' THEN 'Ko'
4    ELSE
5        CASE 
6            WHEN col2 = 1 THEN 'Ko'
7            ELSE 'Maybe'
8        END
9END AS my_result
10FROM table_name;
Amelia
03 Apr 2018
1SELECT
2    CASE 
3        WHEN
4            column IS NULL OR another_column = 1
5        THEN
6            'yes' 
7        ELSE
8            'no' 
9    END AS 'MyData'
10FROM
11    table_name;
Gracelyn
14 Mar 2016
1SELECT CASE col1
2	WHEN 'agree' THEN 'Ok'
3	WHEN 'disagree' THEN 'Ko'
4    ELSE
5        CASE 
6            WHEN col2 >= 1 THEN 'Ko'
7            ELSE 'Maybe'
8        END
9END AS my_result
10FROM table_name;
Alexandra
26 Jun 2017
1SELECT 
2t2.company_name,
3t2.expose_new,
4t2.expose_used,
5t1.title,
6t1.status,
7 CASE status
8   when 'New' and t2.expose_new = 1 then 1
9   when 'New' and t2.expose_new = 2 then 2
10   when 'New' and t2.expose_new = 3 then 3
11   when 'Used' and t2.expose_used = 1 then 1
12   when 'Used' and t2.expose_used = 2 then 2
13   when 'Used' and t2.expose_used = 3 then 3
14END as expose
15FROM `products` t1
16join manufacturers t2 on t2.id = t1.seller
17where t1.seller = 4238
queries leading to this page
sql nested ifmultiple conditions in subquery in mysqloracle case when multiple conditionssql if statement in where clause multiple valuescase then els in mysqlcase and on where mysqlwhen multiple conditions sqlmysql case when elsemysql case when field and fielssql where statement multiple conditionshow to write two conditions inside where in mysqlsql case when multiple andmysql case two conditionsmultiple where clause in sqlmultiple condition in where sqlcase statement in sql with multiple cases how use multiple condition in if in sqlmysql write select in case statementmysql when casesql select nested and casemysql case on whereswitch case syntax in sql servermysql having multiple conditions with if statementmysql case statement multiple conditionsmysql case when multiple conditionssql where multiple conditionsmultiple case when sql in where conditionsql multiple if conditionscase when end as mysqlwhere statement with multiple conditions sqlmysql having multiple conditionsselect case when mysqlswith case in select sql serverslect using case mysqlcase when mysql with ifmysql multiple if conditions with and conditioncase when en sql mysqlselect with case in mysqlcase with column values in mysqloracle case statement with multiple columnscheck 2 if conditions in mysql in select statementmysql no support case cinditionwhere clause multiple valuemysql select query with multiple conditionswhere condition with multiple values in sqlswitch mysql querymultiple if statement mysqlselect case when string mysqlsql case statement in where clause multiple valuessql multiple case statementcase statement in sql with multiple conditionsmysql case when in selectmysql case in selectwhere sql multiple conditionsswitch case mysql 5ccase when multiple conditions sqlcase use in mysqlswitch signs int sqlmysql case when or conditionunion case mysqlmysql create case stament from selectsql multiple and conditionsswitch case my sqlcase mysql multiple conditionsmysql when thenhow can use switch in mysqlswitch uer mysqlhow to write two conditions in case statement in sqlcase when mysqlnested select case sqlcase condition in mysqlcase with multiple else in sqlcase in where mysql functionswitch case sql server selectswitch sqlmysql case in select statementtwo case when in mysqlwhen case in mysqlselect case mysqlcase in mysqlmultiple conditions when sqlswitch in mysqlmultiple case when mysqlsql server procedure where conditions case statement with multiple mysql case ifsql server case statementmysql query with switch casesql query where in multiple conditionscase when in mysqlhow to use case in mysqlcase select mysqlmysql function case switchmultiple conditions in case when sqlcase when is 1 mysqlswitch case mysql with set variablemultiple if in mysqlsql case multiple whent sql case when multiple conditionschekc qual to in swithc case in mysqlhow to use case 2b mysqlcase statement with multiple conditions in oraclenested if statement sql servercase statement in sql servercase on column in mysqlmysql select case examplemulti condition if in sp mysqlswitch casein sql mysqlcase when in mysql with multiple conditionscase statement in mysql select querywhere clause with multiple and in sqlmysql select case elsemysql seelect whenswitch case mysql valuest sql if with multiple conditionsmultiple where conditions sqlmysql switch case insertsql switch statementsql switch caseswitch case in sql servermysql case when into case whensql when multipleswitch case sql columncase with or condition in mysqlsql nested if statement in selectselect with case mysqlmysql if multiple conditionsmultiple case statement in sqlcase when query in mysqlmysql where multiple conditionsmysql case for edge browsercase in mysq 3bsql multiple and in where clause in one queryuse and in case mysqlmysql switch statementuse and in case statment in mysqlcase when with multiple conditions mysqlselect where clause multiple valuestype case in mysqlcase column mysqlhow to multiple conditions in sqlselect column with case statement in sqlmultiple if mysqlwhere clause in sql with multiple valuesmysql set casecase statement in where clause oracle with multiple conditionsmysql mutiple case whensql case multiple asmultiple values in where condition sqlcase mysql querymultiple mysql conditionsql select from where multiple conditionsthen and mysqlmultiple or condition in mysqlmultiple case sqlusing multiple where clause in sqlmysql case when ormysql case lesesql multiple case statementscase to execute commands sqlwhere clause sql with multiple valuessql where clause multiple valuesmysql select with casecase then mysqlcase my sqlsql server switch caseswitch case in sqlsql server switchsql multiple where conditionsmysql 2bcasemultiple conditions on where clause sqlwhere multiple conditions sqlmysql where clause multiple conditionshow to use case when mysqlmysql if and casemysql multiple where conditionsmultiple condition statements in sqlsql multiple casecase when in select mysqlcase when select columnmysql select case not select columnmy sql syntax of casewhere clause with multiple conditionscase sql servermysql case else uppermysql select casemultiple where condition sqlmysql case andselect swtich case mysqlmysql case statements worksheetcase whe is 1 mysqlt sql case when nestedoracle sql query case with or more conditionshow to use case with 2 condition in sql queryis clause in multiple condition sqlcheck 2 conditions in mysqlmysql function case statement examplesql server nested casesql case columncase statement in where clause in mysqlselect case php mysqlcase in where mysqlcase if in mysqlmysql case when querywhen case mysqlsql case when nestedas and then in mysqlcase en mysqlsql multiple case whenmysql case selectswitch to sql servermysql switch case in selectcase whern in mysqlhow to check two conditions in if statement in mysqlmultiple where condition in mysqlcase in mysql after wheret sql nested case in selecthow to use multiple if condition in sqlcase statement mysql case when in mysql querycase statement sql multiple conditionssql switchswitch case in select mysqlcase when sql servermysql select whenmysql case when betweensql case multiple thencase statement multiple conditions and sqlselect statement inside a case statement mysqlmysql query select case whenswitch statement mysqlcase statement with multiple conditions in where clause sql servermysql when case multiple conditions orsql case statement mysqlmysql multiple conditions in where clausewhere clause with multiple and conditionsmultiple conditions where sqlcase in where clause in mysqlwhere clause in sql multiple conditionscase sql serversql query with multiple casemultiple if statements in mysql triggerhow to use multiple case when in mysqlmysql case with 3c 3e mysql case when selectmysql select if else two conditioncase statement in mysqlsql case when 2 conditionsselect column on case in sqlswitch syntax mysqlwhen in mysqloracle case statement multiple expressionssql case when multiple valuestsql case statement with multiple conditionone case 2 conditions sqlcheck multiple if conditions in mysqlsql server nested case when examplemysql case with multiple conditionsmysql switch case defaultswitch case sql server examplecheck 2 conditions in case sqlmysql case when else casemysql case ashow to use case in mysql select querywhen condition in mysqlselecting where condition with multiple values sqlnested case statement in mysqlcase mysql selectsql switch column positionin sql where condition have multiple rowscase when nested if statement in sqlsql statement where multiple conditionsswitch case mysqlmysql multiple rows conditionmultiple conditions in if statement mysqlcase statement in mysql where clauseswitch case sql servercase statement multiple conditions sqlhow to use case in where clause in mysqlnested if condition in sqlsql select multiple where conditionscheck multiple conditions in mysqlselect statement in a case statement mysqlmysql multiple case whenapply manipulation on case column sqlmysql nested caseswitch case in sql select queryupdate query with multiple case statement in sql with where conditionmysql case statementwhere clause with multiple valuesswitch case in mysql select querysql multiple then in casehow to change column value using case in sqlsql query multiple where conditionswhere with multiple conditions sqlcheck 2 if conditions in mysqlsql where clause with multiple valuescase statement for mysql querymysql multi condition andmultiple conditions in where clause sqlmultiple case in sql querymysql case when andcase in mysql select queryswitch in sql servermysql case when syntaxsql where or multiple conditionscase then in mysqlmysql condition with multiple conditionsis in multiple condition sqladd multiple condition on sql casewhere with multiple conditions in sqlmysql trigger if multiple conditionsmy sql casesql query switch case query in case statement mysqlmysql select case whenmysql case when new valuemysql select switchmysql case syntaxsql update case multiple conditionsthen end in mysqlcase for where mysqlmysql multiple conditions in where clause for same columnbetween with when case select mysqlnested case in sqlmultiple value in case statement oraclesql case when example multiplemysql case functionmultiple where conditions in sqlwrite case in mysqlmysql having two conditionsselect where condition in sql multiple conditionshow to have multiple when condition in sqlmultiple if condition in sql select querysql where condition for multiple valuesswithc case mysqlsql case multiple statements in thenmysql case statement with andmysql case statement multiple conditions to checkmysql 2 case statementsnested case sqlsql in multiple conditionsswitch case sqlmysql case thencase if mysqlswitch mysqlhow to write multiple case statements in sqlswitch statement in mysql proceduremysql case orsql where multiple values clausemysql if condition multiplecase when multiple or conditionsmultiple case in query mysqlmysql switch case in functionmysql switchselect case mysql when not in case in where condition in mysqlcase statement with two conditions sqlselect case where mysqlcase when in muysaqlsql or multiple conditionswhere multiple condition sqlmysql case when then endwhere case in mysqlsql server case 2 conditionsuse case statement in mysqlmysql select case if then as columnmysql select satament within case statementmultiple or in where clause sqlpython if statement multiple values in clausenested if else in sqlmysql case statement insertmy sql case whenmysql multiple case statementswhere clause in sql with multiple conditionsmysql switch case textmysql select case statementmultiple and in where clause sqlswitch case with select in sql servercase in mysql querycase when function in mysqlcase wehn mysqlmysql where 2 conditionsmysql select case when multiple conditionswhen case sql mysqlcase in select sql serversql case when multiple conditionscase when multiple conditionsselect inside a case statement mysqloracle sql query case with more conditionsswitch sql serverswitch or use mysqlcase en mysql clausesql nested case statementswitch case example in mysqlsql case nestedmysql casecan we write case statement in where clause in mysqlmysql case whencheck 2 conditions in case mysqlcase when oracle multiple conditionscase syntax for mysqlsql server case when multiplems sql switch statementswitch case mssqluse switch case statement in mysqlmysql when case multiple conditionscase query in mysqlcase in sql serversql switch case examplemultiple condition in mysql querycase statement with multiple conditions in mysqlmysql select with multiple where conditionsoracle case statement multiple columnshow to use multiple if condition in sql querysql multiple conditionswhere case when mysqlsql nested if statementmysql use case whenoracle sql case with multiple conditionssql query with multiple where conditionscase statement with multiple conditions in sql serverhow to use two conditions in case statement in sqlmultiple condition in sql where clausemultiple case when sqlcase statement in oracle with multiple conditions examplesmysql if use several conditions sql nested case whencase when 2 conditions sqlmysql thensql multiple conditionsacase with multiple conditions in sqlmysql case in where clausemssql case when multiple conditionsmultiple case in sql serveroracle sql case statement with multiple conditionsmysql if multiple conditions in selectcase column mysql end assql where clause multiple conditionshow to use case statement in mysqlmultiple conditions in where sqlhow to use multiple where condition in sqltsql case when multiple conditionsmysql use case when without select sql statement with several conditionsmysql can you start with a case statementsql switch case statementmysql case without selectphpmyadmin case returnquery case mysqlwhen mysqlcase when nested sqlmysql case stams sql switch statmentmssql case multiple conditionsmysql case when casemysql set with casecase and end mysqlmultiple condition in case statement in sqlmysql 2b switchcase in mysqnested case statement in sqlsql where with multiple conditionsoracle sql case when multiple conditionsexecute command in case syjntax of mysqlmysql case stop breakmysql query in caseshow to switchthe values in a column in sqlcase statement in oracle with multiple conditionswhere condition multiple valuescase functionpl 2fsql case when multiple valuesswitch case in mysqlmultiple if condition in mysqltable switch mysqlcase when sql multiple conditionsmultiple conditions in on sqlsql change column value casesql select where multiple conditionsmultiple where conditions in mysqlcase when sql server multiple conditionsmysql query case iftwo case when conditions in sqlt sql multiple case whenmysql can i case when a table 3fmysql select case if thenmysql whencase statement mysql operatorsmysql multiple if conditionshow to do multiple when statements sqlmysql switch casemysql set case whencase syntax mysqlmysql case else sql multiple case whencase statement sql server multiple conditionssql case when multiple thencase when then in mysqlcase statements mysqlor in case mysqlmysql case when more than 1 conditionsql multiple conditions where clausemysql switch case in proceduremysql workbench case when mysqlhow to put two conditions in case statement in oracle sqlmysql case case defaultcase when else if mysqlmysql where case statement examplemysql if 2 conditionscase mysqlselect query inside case statement in mysqlsql when multiple conditionsoracle sql query case with in more conditionsnested case statement in oraclemysql case when in where clausecase statement sql serversql multiple where conditions with having statementcase with where clause in mysqlsql function using switch casehow to write multiple where condition in sqlcase when mysql examplecase in mysql selectswicth case mysqlcase when then mysqlsql nested case statementsmysql when then elsemysql case setncenselect mysql where multiple conditionsmysql case whenelsemultiple where condition in queryswitch case in myswlsql if else where multiple valuemysql multiple and conditionsmultiple case statements in sqlsql if statement multiple conditionscheck multiple if using and conditions in mysqlmysql where case whenmultiple when in case sqlmultiple case statements sqlcase when in select statement mysqlmysql function switch casewhere clause multiple valuessql query where multiple conditionscase when in myslqcase when else when mysqlalter table switchmysql case switchcase when trong mysqlsql if multiple conditionsmultiple where condition in sqlmysql case in create tablecase when 2 conditions mysqlcase wehn sql serversql case when multiplesql multiple logical and in if conditionscase in select statement in mysqlselect case statement mysqlmysql case when multipleswitch in mysql queryhow to use case when in nested conditions in sqlmysql update case multiple conditionsthen mysqlcase when with multiple conditionssql case multiple conditionsmultiples conitions case sqlcase statements in mysqlmysql case when thencase default in mysqlcase when select mysqlsql statement with multiple where conditionsnest case whens mysqlmysql query case when only using onemysql case statement equal toselect case in mysqlmultiple conditions case count sqlswitch statements mysql selectswitch columns in sqlmysql case when two conditionssql switch to tablemysql where clause multiple or conditionscase when condition in mysqlmysql multiple casesql case with multiple conditionssql case statement with multiple conditionswhen case mysql examplecase where mysqlmysql case when or