Used with SELECT to return mathematical summaries on columns
(calculate value using records)
AVG(x), MAX(x), MIN(x), SUM(x), COUNT(x)
Back
DELETE
Front
removes data from a table but does not delete the table
Back
DQL
Front
Data Query Language
- for reading information, searching a database
SELECT
Back
RDBMS
Front
Relational Database Management System
software designed to manage a database
Back
Tables
Front
composed of columns (fields) which holds attributes and rows (records) which model an instance
Back
WHERE clause
Front
The WHERE clause is used to extract records that fulfill a specified criteria.
(cannot be used with aggregates)
Syntax:
SELECT column_name,column_name
FROM table_name
WHERE column_name operator value;
Back
HAVING clause
Front
HAVING is an extra clause we use with GROUP BY because oracle wont let you use WHERE.
WHERE filters out records to return, but GROUP BY doesn't return records
used to add condition to your GROUP BY
Back
SQL
Front
Structured Query Language
Used for managing data held inside an RDBMS
Freedom to choose how much code is executed at a time
Back
TRUNCATE
Front
DDL operation used to delete data from a table but preserve its structure for future use
very fast and ideal for deleting data from a temp table
Back
GROUP BY clause
Front
The clause that groups rows based on the specified column
used with aggregate functions to break records into groups
Syntax:
SELECT x, COUNT(x) FROM table_name GROUP BY x;
Back
DML
Front
Data Manipulation Language
- adds, removes, or edits data in a data base
INSERT, UPDATE, DELETE
Back
Aliases
Front
the temporary names given to a table or column for the purpose of a particular SQL query
created to make a table names more readable
Back
Subqueries
Front
a query within a query
The outer query is called as main query and inner query is called as subquery.
the subquery will generally execute first and its output will be used to complete the query condition of the main query
(GROUP BY = ORDER BY for Subquery)
Back
DCL
Front
Data Control Language
- for granting permission to users
GRANT, REVOKE
Back
5 SQL sublanguages
Front
DDL - Data definition language
DML - Data manipulation language
DQL - Data query language
DCL - Data control language
TCL - Transaction control language
Back
VARCHAR2(x)
Front
This datatype is used to store variable length character strings.
The number you specify is just the maximum number of bytes that can be stored (although 1 byte is minimum).
You should use this datatype when you don't know the exact length of stored strings.
Back
Schema
Front
group of database objects associated with a database (a database of tables)
Back
TCL
Front
Transaction Control Language
- for generating transactions
COMMIT, ROLLBACK, SAVEPOINT
Back
COMMIT
Front
Cannot rollback changes once you commit
Automatically updates in AWS database after commit
Back
How to you create/delete a table in SQL?
Front
Create Table name
Drop Table name
Back
Cursor
Front
result set of a SQL query
- what we get back from a database search
- anything from the select
Back
Database
Front
a collection of objects designed to hold information
Back
View
Front
virtual tables based on the result of a query
Back
Relational Database
Front
a database which holds information in tables related to each other
Back
DDL
Front
Data Definition Language
- defines the rules and structures of a database
CREATE, ALTER, DROP, RENAME, TRUNCATE