Before I started using MySql WorkBench, I was using phpmyadmin and liked to set default values of varchars to empty. So in my code I would not have to check for null values and could only use if $value = '' comparisions. How do I put default value as empty in mysql workbench? If i leave the text box empty unlike phpmyadmin it thinks I do not want any default value.
Thanking you
Imran
The workbench has a bug an fails to update the empty string (it says, no changes). I set it to a space first ' ', and then change the sql code to an empty string ''. That does the trick.
Just put two quotes ''
in default
field for your column.
Or right-click on a column and choose Default ''
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With