Is there any gui functionality within mysql workbench where you can view whether a field is set to NULL or NOT NULL?
For example this:
CREATE TABLE Peoples (
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR (200) NULL,
last_name VARCHAR (100) NOT NULL,
PRIMARY KEY (id)
);
Is displayed as
Table Peoples
=============
id, first_name, last_name
-------------
id int(11) PK
first_name varchar(200)
last_name varchar(100)
In the Object Information tab. The object information tab does not specify that the first_name is NULL and the last name is NOT NULL.
It seems unfortunate that one would need to create an entire EER model just to see if a column is nullable.. another workaround i found is to right-click on the table and choose 'Alter Table' and the editor that comes up shows the NN column, checked or not (version 5.2.47).
Under "Data Modelling" use "Create EER Model From Existing Database" or open up an existing model of the desired database if you have one. Then select the desired table and the bottom window will show the table's properties. The "Columns" tab will show what columns are NULL by default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With