Sometimes it is necessary to retrieve specific data from a database. To tell this through the RDBMS we use a where clause against our select queries. As an ordinary select query, we define which columns we wish to retrive from which tables. With the where clause defined after this, we define which criterias we wish to filter out.
|--- SQL command to select all the data from a specific provided they fullfill the where clause ---|
|SELECT * FROM tableName WHERE column1 = value1;|
The where clause can also be used in conjunction with either update or delete to edit data in a database. When modifying data through either it is recommended to do a select first to have a view of the data being edited.
|--- SQL command to create a table named Ducks, containing DuckNumber & DuckName ---|
|DELETE FROM tableName WHERE column1 = value1;|