Hello All...
This is me:
http://www.experts-exchange.com/M_2293853.html
(...just so you know that my background is in MS Access)
I am attempting to teach myself MySQL empirically, so some of my questions here will be fairly simple...
Yes, I know that MySQL is not the same as MS Access, but I am just starting out with MySQL and I just want the learn the basics of creating tables, adding records and querying the tables.
;-)
Ready? Here we go....
I created a simple Customers table:
cID: INT, PK, NN, AI
cName: VARCHAR(15), NN
cDOB: DATE, NN
cCreditLimit: DOUBLE, NN
(Now in the main window, I do have a "Local Instance" connection, and a "Local Server"
Don't ask me how I created them, because I don't remember. ;-)
....but again, remember, all I want to do is get familiar with creating tables, adding records and querying the tables.)
Great, ...looks good...
Now all I want to do at this moment is to open the table and add some records into it (to see the auto increment work, to see that only numbers can be entered into the cCreditLimit field, and verify the 15 character limit on the cName field, ...etc)
So I click the "Inserts" tab and I go about entering data....
Much to my surprise, ...I can pretty much type in anything in any field!?
I can even click "Save" and exit the file, ...and when I reopen the file (and the table) all of this "invalid" data is still there.
What is happening here?
In other words, what is the "Inserts" tab for, if I can simply "insert" whatever I want, wherever I want...
Put still another way,...once I create a table and set the columns, how do I actually open the table to enter records manually and see the table column settings in effect?
(Yes there are tutorials and videos out there, but none that say: "After you set up your table and columns you can enter data and test these setting by:....?"
Thanks!
If I have forgotten anything or if anything is unclear, just let me know...
;-)
JeffCoachman
Now, nothing prevents you from inserting whatever value you want in an auto_increment field. If th new value is greater than the old index value, the next index value will be your value plus one.
As for the other fields, you can type in whatever you want in the GUI, but when you click on "Apply" (and then Apply on the resulting SQL) the queries will fail.
I've been a command line guy for years, recently started using MSSQL/SSMS and like that a lot (where it's 'Edit Top X rows' does what I think you want it to do - immediate error on data type mismatch), and I agree with you that Workbench needs more work.