![]() ![]() ![]() G: This ‘G’ option is for ‘Generated Columns’ for advanced use like expression caching, provide join index for nonrelational data, etc.We are not going to manually enter each ‘StudentId’, so we will let the system auto-generate and increment the StudentIds. We will be storing all the positive values in our ‘StudentId’ column, so we will select the ‘unsinged’ option. This option is only used for a number that stores either positive or negative values. UN: The UN checkbox means ‘Unsigned’ data type.true or false, then you need to select this checkbox. So, if your column is going to store 0 or 1 i.e. That is the values containing only 1 or 0s. B: The ‘B’ checkbox is used to store only binary or bit values.So, whenever you want to store unique values for a column, then you need to select this check box. ![]() UQ: Select the ‘UQ’ checkbox to store only unique values.So, whenever you want to make any column as NOT NULL, you need to check this NN Check box. NN: As the ‘Primary Key’ column does not store NULL values, so MySQL workbench will automatically check ‘NN’ means the Not Null option.So, the column that you want to make as the Primary key, you need to select this PK option for that column. PK: This will make the column Primary Key.In column name, type StudentId, data type INT, select this ‘PK’ checkbox to make this column the ‘Primary Key’ column. Click inside the middle window and type column name. ![]() Use default charset/collation and engine. On the above ‘new table’ screen, enter the table name. Once you click on the Create Table option, it will open the below create new table window. Select the ‘ Tables’ submenu under the mytestdb database, and then right-click on it and select the ‘create table’ option as shown in the below image. At this moment we’ve just created the database so there are no tables or other information stored in it. The submenu contains tables, views, stored procedures, and functions as shown in the below image. In my case ‘mytestdb’, double click the database name, it will display the submenu under the database. Under the SCHEMAS menu, select the newly created database. Then I created one database called mytestdb by executing the following SQL Script. How to Create Alter and Drop Database table using MySQL Workbench?įirstly, I’ve opened MySQL Workbench and logged in to my MySQL database server using the ‘root’ username and password. Please read our previous article where we discussed how to create, alter and drop databases using MySQL Workbench. In this article, I am going to discuss How to Create Alter and Drop MySQL Database table using MySQL Workbench.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |