Download presentation
Presentation is loading. Please wait.
Published byDuane Farmer Modified over 9 years ago
1
SQL Select Statement IST359 M005 Yang Wang ywang@syr.edu 342 Hinds http://blackboard.syr.edu
2
Acknowledgements and caveat These slides draw liberally, with permission, from the following sources: IST359 materials by Prof. Michael Fudge Jr. Slides from Murach’s SQL Server 2008 book Caveat (beware): At best, PowerPoint slides are only a pale limitation of the entirety of a class meeting. In IST359 in particular, the lectures will cover topics beyond what appears in these slides. Don’t rely on them as a substitute for attending class.
3
Agenda Understanding Fudgemart Select from, where, order by Top and distinct keywords Table joins Column and table aliasing
4
Fudgemart – Conceptual
5
Fudgemart - Internal
6
SELECT SELECT {colname [, n] | * } FROM tablename [WHERE condition] [ORDER BY col [ASC | DESC]]
7
SELECT SELECT employee_id, employee_hourlywage FROM employees WHERE employee_hourlywage > 10 ORDER BY employee_id DESC
8
Demo #1 Basic SELECT – Columns – Where ( AND.vs OR) – Order by – Cast / Convert – TOP / Distinct
9
SELECT HOW WE SAY IT 1.SELECT (Projection) 2.TOP/ DISTINCT 3.FROM 4.WHERE 5.ORDER BY HOW IT IS PROCESSED 1.FROM 2.WHERE 3.SELECT (Projection) 4.ORDER BY 5.TOP / DISTINCT
10
Demo – Table Joins Select JOINS – Cross (Cartesian product) – Inner / Equijoin – Table and Column Aliasing – Outer joins (Left / Right / Full)
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.