Section 1

Preview this deck

Distinct 1

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

2 years ago

Date created

Mar 1, 2020

Cards (71)

Section 1

(50 cards)

Distinct 1

Front

SELECT DISTINCT "column_name" FROM "table_name"

Back

Row

Front

A record that represents a collection of information relating to an item in a table.

Back

Delete From Statement

Front

DELETE FROM "table_name" WHERE {condition}

Back

LIKE operator

Front

A character operator. When used in conjunction with asterisks or brackets, matches parts of a value within a table.

Back

Table

Front

Structured file containing rows and columns.

Back

Create Table

Front

CREATE TABLE customer (First_Name char(50), Last_Name char(50), Address char(50), City char(50), Country char(25), Birth_Date date)

Back

Data type

Front

Specifies the type of data that a column can hold (e.g., text and numbers).

Back

Parts of a query include the following: Clause

Front

A segment of an SQL statement combined to form a complete SQL statement.

Back

Keys

Front

Uniquely identify a row or record in a table.

Back

NOT operator

Front

A logical operator used to match any condition opposite of the one defined.

Back

Parts of a query include the following: Statement

Front

Keywords and data supplied within an SQL query.

Back

Drop Table Statement

Front

DROP TABLE "table_name"

Back

Sorting Data Using the WHERE Clause

Front

The ability to sort data further enhances the data-retrieval process. Sorting data involves filtering and arranging retrieved data in a customized fashion. In SQL, this is achieved by using the following clauses: GROUP BY HAVING ORDER BY STARTING WITH WHERE

Back

Insert Into Statement

Front

INSERT INTO "table_name" ("column1", "column2", ...) VALUES ("value1", "value2", ...)

Back

Keywords: FROM keyword

Front

Used to tell the database which table to retrieve the columns from.

Back

Between

Front

SELECT "column_name" FROM "table_name" WHERE "column_name" BETWEEN 'value1' AND 'value2'

Back

Comparison Operators

Front

The comparison operators are used to compare expressions. An expression is any data type that returns a value

Back

Server

Front

A multiple-user computer that provides shared database connection, interfacing, and processing services.

Back

Select Statement

Front

SELECT "column_name" FROM "table_name"

Back

Brackets wildcard character ( [] )

Front

When used with the LIKE operator, you can specify a set of characters that match a character in a specific position.

Back

ASC keyword

Front

Used to sort data in ascending order.

Back

Where

Front

SELECT "column_name" FROM "table_name" WHERE "condition"

Back

Query

Front

A question or command you pose concerning data from the database.

Back

Update Statement

Front

UPDATE "table_name" SET "column_1" = [new value] WHERE {condition}

Back

Create Table Statement

Front

CREATE TABLE "table_name" ("column 1" "data_type_for_column_1", "column 2" "data_type_for_column_2",... )

Back

IN operator

Front

A miscellaneous operator that provides a shorter method for specifying a range of conditions.

Back

Database

Front

A collection of electronically stored organized files.

Back

Arithmetic Operators

Front

Plus (+) Minus (-) Divide (/) Modulus (%) Multiply (*)

Back

SQL Defined

Front

SQL is a nonprocedural language that is used to manipulate and retrieve data from relational DBMSs such as Microsoft Access, DB2, Sybase, and Microsoft SQL Server. It is considered nonprocedural because of the way operations are carried out. Unlike procedural computer languages like Basic and C, which are concerned with how to perform operations, SQL describes what needs to be processed. The focus is on what to retrieve, delete, or insert.

Back

In

Front

SELECT "column_name" FROM "table_name" WHERE "column_name" IN ('value1', 'value2', ...)

Back

Field

Front

Column that runs vertically within a table.

Back

Asterisk wildcard character (*)

Front

When used with the LIKE operator, you can match any number of occurrences of any character.

Back

Count

Front

SELECT COUNT("column_name") FROM "table_name"

Back

ORDER BY clause

Front

Retrieves the name of one or more columns from the SELECT statement, and sorts (ascending or descending) the output.

Back

Client/server database system

Front

A system that divides processing between client computers and a database server.

Back

DESC keyword

Front

Used to sort data in descending order

Back

Syntax Rules

Front

Syntax refers to the rules that govern how a programming language must be written.

Back

Keywords: SELECT keyword

Front

Used to tell the database which column(s) to display.

Back

Having

Front

SELECT "column_name1", SUM("column_name2") FROM "table_name" GROUP BY "column_name1" HAVING (arithematic function condition)

Back

Parts of a query include the following: Keywords

Front

Reserved words that allow you to communicate with a database.

Back

And/Or

Front

SELECT "column_name" FROM "table_name" WHERE "simple condition" {[AND|OR] "simple condition"}+

Back

Pprimary key

Front

A field whose value uniquely identifies every row in a table.

Back

Normalization

Front

A three-step technique used to organize data attributes in a more efficient, reliable, flexible, and maintainable structure.

Back

Comparison Operators

Front

Back

Order By

Front

SELECT "column_name" FROM "table_name" [WHERE "condition"] ORDER BY "column_name" [ASC, DESC]

Back

Truncate Table Statement

Front

TRUNCATE TABLE "table_name"

Back

Group By

Front

SELECT "column_name1", SUM("column_name2") FROM "table_name" GROUP BY "column_name1"

Back

Like

Front

SELECT "column_name" FROM "table_name" WHERE "column_name" LIKE {PATTERN}

Back

Foreign key

Front

Link records of one type with those of another type.

Back

Client

Front

A single-user computer that interfaces with the multiple-user server.

Back

Section 2

(21 cards)

MIN

Front

SELECT MIN("column_name") FROM "table_name"

Back

Outer Join

Front

SELECT A1.store_name, SUM(A2.Sales) SALES FROM Geography A1, Store_Information A2 WHERE A1.store_name = A2.store_name (+) GROUP BY A1.store_name

Back

AVG

Front

SELECT AVG(Sales) FROM Store_Information

Back

Alias

Front

SELECT "table_alias"."column_name1" "column_alias" FROM "table_name" "table_alias"

Back

MAX

Front

SELECT MAX("column_name") FROM "table_name"

Back

Cross Join

Front

SELECT A1.store_name STORE1, A2.store_name STORE2, A2.Sales SALES FROM Geography A1 JOIN Store_Information A2

Back

LENGTH Function

Front

SELECT Length(store_name) FROM Geography WHERE store_name = 'Los Angeles';

Back

ROUND Function

Front

SELECT First_Name, ROUND(Rating, 1) Rating FROM Student_Rating

Back

CONCATENATE Function

Front

SELECT CONCAT(region_name,store_name) FROM Geography WHERE store_name = 'Boston';

Back

INSTR Function

Front

SELECT INSTR(store_name,'o') FROM Geography WHERE store_name = 'Los Angeles';

Back

Left Outer Join

Front

SELECT A1.store_name STORE, SUM(A2.Sales) SALES FROM Geography A1 LEFT OUTER JOIN Store_Information A2 ON A1.store_name = A2.store_name GROUP BY A1.store_name

Back

REPLACE Function

Front

SELECT REPLACE(region_name, 'ast', 'astern') FROM Geography;

Back

TRIM Function

Front

SELECT TRIM(' Sample ');

Back

Inner Join

Front

SELECT A1.store_name STORE, SUM(A2.Sales) SALES FROM Geography A1 INNER JOIN Store_Information A2 ON A1.store_name = A2.store_name GROUP BY A1.store_name

Back

Select Unique

Front

SELECT UNIQUE Sales FROM Store_Information

Back

SUBSTRING Function

Front

SELECT SUBSTR(store_name, 3) FROM Geography WHERE store_name = 'Los Angeles';

Back

CAST Function

Front

SELECT First_Name, CAST(Score AS Integer) Int_Score FROM Student_Score

Back

Count

Front

SELECT COUNT("column_name") FROM "table_name"

Back

SUM

Front

SELECT SUM("column_name") FROM "table_name"

Back

Wildcard

Front

We want to find all stores whose name contains 'AN'. To do so, we key in, SELECT * FROM Store_Information WHERE store_name LIKE '%AN%'

Back

CONVERT Function

Front

SELECT First_Name, CONVERT(Score, Integer) Int_Score FROM Student_Score

Back