Is there a way in mysql I can set to default?
$q = $dbc -> prepare("UPDATE accounts SET thisColumn = thisColumn(DEFAULT) WHERE id = ?");
Is there a function to set to default in mysql?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is the
DEFAULTkeyword:DEFAULT(col_name)can only be used if a default is explicitly set for that column, butDEFAULTshould always work.Untested, but this should work: