Database
Database
Topics
DBMS
Data
Tables, Rows, and Columns
Name Phone
Katie Allen 555-1234
Jill Ammons 555-5678
Each row contains data about one person Kevin Brown 555-9012
Elisa Garcia 555-3456
Jeff Jenkins 555-7890
Column Data Types
Navigator bar
Auto-Generated Code
Navigator bar
You can use the AND, OR, and NOT logical operators to
specify multiple search criteria in a WHERE clause
• The AND operator requires both search criteria be true for a row
to be qualified as a match
SELECT * FROM Product WHERE Price > 20.00 AND Price < 30.00
• The above statement retrieves all the rows in which the Price column is
less than the value of the priceValue parameter
• When you call the table adapter method for an SQL query, you have to
pass arguments for any parameters that are used in the query
private void searchButton_Click(object sender, EventArgs e)
{
this.productTableAdapter.SearchDesc(
this.productDataSet.Product, searchTextBox.Text);
}
• The above code calls the table adapter's SearchDesc method
• The 2nd argument is the searchTextBox control's Text property
End