KM_Pres_PA_Ch3_update_fall_05

KM_Pres_PA_Ch3_update_fall_05 - An Introduction to SQL...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
An Introduction to SQL A Look at What is Coming in Lab
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Arithmetic and Comparison Operators Arithmetic Operator And they all mean the same old thing + Addition - Subtraction * Multiplication / Division Comparison Operator = Equal to < Less than > Greater than <= Less than or equal to >= Greater than or equal to <> Not equal to (used by most implementations) != Not equal to (used by some implementations)
Background image of page 2
Built-in Functions (aka Native Functions) Count Count of the number of rows satisfying the where clause Sum Sum of the values in a column for all rows satisfying the where clause Avg Average of the values in a column for all rows satisfying the where clause Max * Largest value in a column for all rows satisfying the where clause Min * Smallest value in a column for all rows satisfying the where clause * If column is numeric; if not, entry based on collating sequence)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Truth Tables AND T F U N NOT T T T F U N T F F F F F F F T U U F U N U U N N F N N N N OR T F U N T = True T T T T T F = False F T F U N N = Null U T U U U U = Unknown N T N U N
Background image of page 4
SQL: The Basics Select Select From From Where Where And And Or Or Not Not Having Having Group by Group by Rollup Rollup Cube Cube Count() Count() Max() Max() Min() Min() Sum() Sum() Average() Average() Update Update Insert Insert Delete Delete Like Like Order by Order by In In Any Any All All Union Union Minus Minus Intersect Intersect Create Create Alter/Modify Alter/Modify Drop Drop (Join) (Join)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Most Basic Form of SQL Query SELECT … SELECT … FROM FROM WHERE …
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 20

KM_Pres_PA_Ch3_update_fall_05 - An Introduction to SQL...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online