Reputation: 197
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.
Upvotes: 1
Views: 9159
Reputation: 53337
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).
Upvotes: 1