KM_Pres_PA_Ch3_update_fall_05

# KM_Pres_PA_Ch3_update_fall_05 - An Introduction to SQL...

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

An Introduction to SQL A Look at What is Coming in Lab

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

View Full Document
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)
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)

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

View Full Document
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
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)

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

View Full Document
Most Basic Form of SQL Query SELECT … SELECT … FROM FROM WHERE …
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 04/16/2008 for the course BA 105W taught by Professor Mohle during the Spring '08 term at CSU Fresno.

### 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
Ask a homework question - tutors are online