mardi 11 août 2020

Can I run an IF statement form the mysql command line? v 5.6

SET @credit = 'True'; // This works query ok.

If @credit = 'True' THEN SET @credit = 'False'; // Get an error

SELECT @credit; // can't get this far

Trying to run a mysql IF statement from the console, but can't get the simplest of statements to work? What am I missing? The error: There is an error near If @credit = True THEN SET @credit = False'

Aucun commentaire:

Enregistrer un commentaire