Title: Error creating a table: Failed to create table
Last modified: August 22, 2016

---

# Error creating a table: Failed to create table

 *  [essjrnet](https://wordpress.org/support/users/essjrnet/)
 * (@essjrnet)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/error-creating-a-table-failed-to-create-table/)
 * Hello,
 * I am trying to create a simple table using this plugin, but i am getting a error:“
   Failed to create table.” Any idea!? Does it requires a special permission?
 * CREATE TABLE `wp_15324283_tu_home_highlights` (
    `ID` int(11) unsigned NOT NULL
   AUTO_INCREMENT COMMENT ‘ID’, `title` varchar(250) NOT NULL, `image_url` varchar(
   500) NOT NULL, `description` varchar(1000) NOT NULL, `main_highlight` bit(1) 
   NOT NULL DEFAULT ‘0’, `recent_highlight` bit(1) NOT NULL DEFAULT ‘0’, `active`
   bit(1) NOT NULL DEFAULT ‘0’, `post_date` datetime NOT NULL, `created` datetime
   NOT NULL DEFAULT ‘0000-00-00 00:00:00’ COMMENT ‘Created Date’, `updated` timestamp
   NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT ‘Updated
   Date’, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT=’tu_home_highlights’;
 * I appreciate your support
    Regards
 * [https://wordpress.org/plugins/custom-database-tables/](https://wordpress.org/plugins/custom-database-tables/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/error-creating-a-table-failed-to-create-table/#post-5788061)
 * Hello, Thank you for inquiry.
 * On MySQL database, if you specify the “bit” to type format of the column, you
   can not specify the default value to “0”.
 * So that,
 * column_name bit (1) NOT NULL DEFAULT ”
 * Or,
 * column_name bit (1) DEFAULT NULL
 * You will be able to create new table when you will modify as described above.
 * However, for a column of type “bit”, there was an error in the data input from
   the “Input data” page. It was a bug, I should be fix in the next version.
 *  Thread Starter [essjrnet](https://wordpress.org/support/users/essjrnet/)
 * (@essjrnet)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/error-creating-a-table-failed-to-create-table/#post-5788098)
 * Hello,
 * I followed your instructions and I created the table.
 * I believe that the system have more bugs, I can`t insert the values in the tables.
   There is a issue in bit fields. What are the values that I need to insert in 
   bit fields?
 * Thanks
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/error-creating-a-table-failed-to-create-table/#post-5788122)
 * Sorry for having many troubles in the plugin.
 * The bit field of MySQL is a synonym for “tinyint (1)”. The “tinyint (1)” itself
   is the only numeric value of 0, 1, 2-127 can be stored, but “bit (1)” is 2-127
   can not be stored. In other words, you can store 0 and 1 and NULL in bit field.
 * Therefore, input data of plugin to the bit field must be modified at 0 and 1 
   only.
 * I would like to fix asap and release a bug fix version.
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/error-creating-a-table-failed-to-create-table/#post-5788124)
 * Hello,
 * I tried to check the specifications of MySQL again.
    Default value of bit type
   field there was a need to be specified in the binary bit values.
 * According to it, SQL statement to set the default value in the column of “bit(
   1)” is as follows.
 * column_name bit(1) NOT NULL DEFAULT b’1′
 * Or,
 * column_name bit(1) NOT NULL DEFAULT b’0′
 *  Thread Starter [essjrnet](https://wordpress.org/support/users/essjrnet/)
 * (@essjrnet)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/error-creating-a-table-failed-to-create-table/#post-5788145)
 * Hello,
 * I realized that you released a new version of the plugin. It’s much better! I
   inserted the data that i was trying with success.
 * I found a little problem on the list screen. The typed values in bit fields are
   not shown in the list. Are shown only blank fields .
 * An interesting improvement that could be made is inserting a date picker, for
   lay users should be difficult to guess the format that should be inserted in 
   the date fields.
 * Thank you very much
 *  Plugin Author [ka2](https://wordpress.org/support/users/ka2/)
 * (@ka2)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/error-creating-a-table-failed-to-create-table/#post-5788149)
 * Hi, Thank you for report.
 * I was able to confirm the problem that you have reported to me.
 * I remember that plugin was working normally when immediately after that fixes
   bug of bit type field. I think maybe became to not work with affected after that
   fix other bugs.
 * I investigate, and will do the fix again.
 * Sorry, please wait for fixing a bug.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Error creating a table: Failed to create table’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-database-tables_e4e2e2.svg)
 * [Custom DataBase Tables](https://wordpress.org/plugins/custom-database-tables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-database-tables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-database-tables/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-database-tables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-database-tables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-database-tables/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [ka2](https://wordpress.org/support/users/ka2/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/error-creating-a-table-failed-to-create-table/#post-5788149)
 * Status: not resolved