In this video we will learn How to Insert, Read, Update and Delete the data rows using MySQL Workbench. Open MySQL Workbench and logged in to MySQL database server using 'root' username and password. In previous video we successfully created a test database called 'mytestdb' and 'students' table using MySQL Workbench. In this video we will see how to insert, update or delete data rows in our 'students' table.
Under schemas menu, select the database name, tables, and table name we created in previous lecture that is 'students' table. When we hover the mouse pointer, over the 'student' table name, we can see a table icon appears. Click the table icon, which open a new window, in which the upper section shows the MySQL statement, while the lower section show the data rows. At this moment, we have no data row in the 'student' table. So the table shows NULL data row values. To enter a new data row, just select the respected column and type the data value. Its something similar to Microsoft Excel spreadsheet. I'll enter data rows, click 'apply' to generate SQL statement, click apply and finish to execute the statement and save the changes.
Similarly, we can edit the data row, save new value and apply the changes, which will generate an update SQL statement and save the changes to the database table. To delete an individual row from the table, select the data row, right click the 'right icon' in-front of the row and select 'delete row' option. Click 'apply' button to execute the SQL statement and save the changes to the database table.