How do I put an 'if clause' in an SQL string?

前端 未结 9 1400
误落风尘
误落风尘 2021-01-29 18:16

So here\'s what I want to do on my MySQL database.

I would like to do:

SELECT *
    FROM itemsOrdered
    WHERE purchaseOrder_ID = \'@purchaseOr         


        
9条回答
  •  爱一瞬间的悲伤
    2021-01-29 19:04

    Select FROM t1
        WHERE s11 > ANY
            (SELECT col1,col2 FROM t2
                WHERE NOT EXISTS
                    (SELECT * FROM t3
                        WHERE ROW(5*t2.s1,77)=
                            (SELECT 50,11*s1 FROM t4 UNION SELECT 50,77 FROM
                                (SELECT * FROM t5) AS t5)));
    

提交回复
热议问题