Presentation is loading. Please wait.

Presentation is loading. Please wait.

Query Methods Where Clauses Start ….

Similar presentations


Presentation on theme: "Query Methods Where Clauses Start …."— Presentation transcript:

1 Query Methods Where Clauses Start …

2 All – most - some ... ALL : Define the term SQL
MOST : Describe the syntax for using WHERE clauses SOME : Explain how to use operators with WHERE clauses Next …

3 Click to explore more about the WHERE clauses …
What is a Database? INSERT Statements UPDATE Statements Thought board What is SQL? DELETE Statements

4 What is a Database ..? A database is just a collection of data A simple database could be a computing text book Next …

5 What is a Database ..? Data about each topic is stored in the book The data is organised into chapters You can search for a topic using the content and index pages Back … Next …

6 What is a Database ..? Organisations have data that they need to store, collate and analyse 30 years ago this data would have been stored in a filing cabinet Back … Next …

7 What is a Database ..? Modern organisations use computer systems to store, collate and analyse data These systems are called Databases Back … Explore …

8 What is SQL ..? SQL (Structured Query Language) is used to search through and manage databases SQL is written as statements that are executed by the database Next …

9 What is SQL ..? SQL statements can be used to perform the following tasks … Execute queries against a database Retrieve data from a database Insert records in a database Update records in a database Delete records from a database Back … Explore …

10 Insert Statements … The INSERT INTO statement is used to insert new records in a table Next …

11 Insert Statements … You can write the INSERT INTO statement in two forms … The first form does not specify the column names only the values Back … Next …

12 What do you think this SQL statement will do?
Insert Statements … Think about this SQL statement … INSERT INTO table_name VALUES (value1,value2,value3,...); What do you think this SQL statement will do? Back … Next …

13 Insert Statements … You can write the INSERT INTO statement in two forms … The second form specifies both the column names and the values Back … Next …

14 What do you think this SQL statement will do?
Insert Statements … Think about this SQL statement … INSERT INTO table_name (column1,column2,column3,..) VALUES(value1,value2,value3,..); What do you think this SQL statement will do? Back … Next …

15 What do you think this SQL statement will do?
Insert Statements … Think about this SQL statement … INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country) VALUES ('Cardinal','Tom Holland',‘47 Main Street',‘Hinckley',‘LE16 5UT',’UK'); What do you think this SQL statement will do? Back … Next …

16 What do you think this SQL statement will do?
Insert Statements … Think about this SQL statement … INSERT INTO Customers (CustomerName, City, Country) VALUES ('Cardinal', ‘Hinckley', ‘UK'); What do you think this SQL statement will do? Back … Explore …

17 Update Statements … The UPDATE statement is used to update records in a table UPDATE table_name SET column1=value1,column2=value2,... WHERE column3=value; Next …

18 What do you think this SQL statement will do?
Update Statements … Think about this SQL statement … UPDATE Customers SET Job_Title=’Director', Business_Phone='(0123) ' WHERE Company=‘XYZ Ltd'; What do you think this SQL statement will do? Back … Explore …

19 Delete Statements … The DELETE statement is used to delete records in a table DELETE FROM table_name WHERE some_column=some_value; Next …

20 What do you think this SQL statement will do?
Delete Statements … Think about this SQL statement … DELETE FROM Customers WHERE CustomerName=‘XYZ Ltd' AND ContactName=Peter Smith'; What do you think this SQL statement will do? Back … Explore …

21 Deletes data from a table
Thought Board … INSERT Updates data in a table UPDATE Deletes data from a table DELETE Adds new data to a table Explore …


Download ppt "Query Methods Where Clauses Start …."

Similar presentations


Ads by Google