From the course: Linux System Engineer: Database Servers Using MariaDB

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Renaming tables and updating records

Renaming tables and updating records

From the course: Linux System Engineer: Database Servers Using MariaDB

Start my 1-month free trial

Renaming tables and updating records

- [Instructor] For this exercise, make sure you're logged into MariaDB as root and are using the linuxdevs database. Your prompts should look the same as mine. Let's put on a simple select statement to ensure that your database is ready. Type in select * from developers; and hit enter. If you see what I see, then let's proceed. In this exercise, we will rename our table to linuxdevs. We will also change some of the information in the table, and ultimately delete a record. First, let's rename the developers table. Type in rename table developers to linuxdevs; and then hit enter. Now verify with show. Type in show tables; and hit enter again. We should now see we only have one table and it's named linuxdevs. Now let's show all data in the table. Type in select * from linuxdevs; and hit enter. Now let's change some data in the table. I've always wanted to be the premiere Linux developer, so let's change Linus' name to Grant McWilliams. For that, we'll use the update command. Type in…

Contents