简体   繁体   中英

MySQL Workbench doesn't commit changes

It's my first question on here. I just started studying ICT. I learned the basics of making MYSQL databases. But I have to make an assignment of it in my vacation period.

Now we only had one lesson working in MYSQL workbench (6.1 CE version), and they said I could add data into the tables inside the Workbench.

Now I where and how to do that, I still have the problem that it doesn't save the data. Every time I click apply I get the error "Commit recordset changes" and "1 error or more errors saving changes to table (followed by the name of the tables).

错误图片

Someone who knows the error, because with some tables it does save the data, with other (like this one) it doesn't.

Whenever you get an error when commiting changes have a look at the table definition (see Alter Table in the context menu in the schema sidebar to open the table editor). The little info window in the lower left corner doesn't tell you everything, especially if a column can be null or not.

This way you learn if you can leave a value null or not. In addition, MySQL's datetime format is YYYY-MM-DD ( http://dev.mysql.com/doc/refman/5.7/en/datetime.html ). Since there is no collation or any other cultural information attached to a date or datetime column it doesn't matter how your later visual representation will be, you always enter it in the above mentioned format. Only TIMESTAMP can be a bit more tricky, as the server converts that from the current time to UTC (so the current timezone matters).

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM