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.

Query a database

Query a database

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

Start my 1-month free trial

Query a database

- [Instructor] Now that we have a working database with data in it, let's try some queries. But before we move on, let's verify our database is ready. Make sure you are logged into MariaDB as root, and that you are using the linuxdevs database. Your prompt should reflect this. Now let's query all records in our database. Type in select, space, asterisk, space, from, space, developers, semicolon. This will verify that everything is ready. Now let's do some more specific queries. Let's only show developers that are 50 years old. Bring your line back, and add to the end where space Age with a capital A equals 50, semicolon. And hit Enter. This should show Alan Cox and Ted Tso. Now, let's query for developers under 50. Bring your line back, change age equals 50 to age space less than 50, and hit Enter. This should only show Linus Torvalds. We can show specific records as well by being more precise. Bring your line back again, and change age less than 50 to Lastname equals single quote…

Contents