Return To CS 100 Home

Colour Theme   Font Size Options

Searching a Database

Searching an SQL database is referred to as "selecting" data to view. While you can specify to only see certain columns, for simplicity's sake we will always search each column of the database.

To show every item in our books database, you would write :


In SQL, a '*' is called a wildcard. This is a placeholder that stands for "can be anything." In this case, since we are searching just the '*', we are searching for anything in the database, which is why every record is displayed.

Searching for strings