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
Just put two quotes ''
in default
field for your column.
Or right-click on a column and choose Default ''
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.