Download presentation
Presentation is loading. Please wait.
Published byMarjorie Anderson Modified over 6 years ago
1
Query Methods Simple SQL Statements Start …
2
All – most - some ... ALL : Define the term SQL
MOST : Describe the syntax for SQL statements SOME : Explain how to use SQL statements on a database Next …
3
Click to explore more about the SQL Statements …
What is a Database? SQL Statements? Thought board What is SQL? Select 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
Simple SQL Statements …
We use SQL Statements to manage large databases SQL statements can be used to Select Data, Update Data and Delete Data Next …
11
Simple SQL Statements …
Think about this SQL Statement … SELECT * FROM Customers; What do you think this SQL statement will do? Back … Next …
12
Simple SQL Statements …
Think about this SQL Statement … SELECT * FROM Customers; This is known as a Select Statement It will select all the data from the Customers table Back … Next …
13
Simple SQL Statements …
SELECT * FROM Customers; Notice that … SELECT and FROM are in capitals The asterisk (*) means everything The semi-colon (;) marks the end of the SQL statement Back … Explore …
14
Select Statements … The SELECT statement is used to select data from a table The result is stored in a result table, called the Result-Set Next …
15
Select Statements … SELECT column_name,column_name FROM table_name; SELECT * FROM table_name; What do you think these two SQL statements will do? Will they select the same data? Northwind – create a select statement to ….. Back … Next …
16
Select Statements … To select data from the Customers table in a database, you could use this statement … SELECT CustomerName,City FROM Customers; Back … Next …
17
Select Statements … SELECT CustomerName,City FROM Customers; This statement will select the CustmerName and City fields from the Customers table Back … Next …
18
What do you think this SQL statements will do?
Select Statements … Rather than specifying what fields are to be selected, you can add the astrick (*) SELECT * FROM Customers; What do you think this SQL statements will do? Back … Next …
19
Select Statements … SELECT * FROM Customers; This statement selects everything from the Customers table Back … Explore …
20
Thought Board … SELECT * FROM Customers;
SELECT CustomerName,City FROM Customers; Explore …
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.