Logo
Pattern

Discover published sets by community

Explore tens of thousands of sets crafted by our community.

SQL Basics

30

Flashcards

0/30

Still learning
StarStarStarStar

VARCHAR

StarStarStarStar

Defines a variable-length string data type. Used for columns that contain letters and numbers in a database.

StarStarStarStar

SELECT

StarStarStarStar

Retrieves data from one or more tables. Used to query the database and get specific records.

StarStarStarStar

AUTO_INCREMENT

StarStarStarStar

A database feature that automatically generates a unique number for the primary key field in a table. Used to create a unique identifier for new rows with minimal manual input.

StarStarStarStar

WHERE

StarStarStarStar

Filters records based on specified conditions. Used to narrow down the results returned from a SELECT, UPDATE or DELETE command.

StarStarStarStar

GROUP BY

StarStarStarStar

Groups rows sharing a property so that an aggregate function can be applied to each group. Commonly used in conjunction with aggregate functions like COUNT, MAX, MIN, SUM, AVG.

StarStarStarStar

LEFT JOIN

StarStarStarStar

Returns all records from the left table and the matched records from the right table. The result is NULL from the right side if there is no match.

StarStarStarStar

PRIMARY KEY

StarStarStarStar

A constraint that uniquely identifies each record in a database table. Used to ensure that every row has a unique value and is not null.

StarStarStarStar

NOT NULL

StarStarStarStar

A constraint that ensures that a column cannot have a NULL value. Used to enforce data integrity by ensuring that specific columns always contain a value.

StarStarStarStar

CASE

StarStarStarStar

Allows for condition-based logic within an SQL query. Used for creating different outputs based on conditions.

StarStarStarStar

DROP TABLE

StarStarStarStar

Removes a table from the database. Used to delete a table and all of its data permanently.

StarStarStarStar

FOREIGN KEY

StarStarStarStar

A constraint that creates a link between two tables. Used to establish and enforce a link between the data in two tables to control the data that can be stored in the foreign key table.

StarStarStarStar

INT

StarStarStarStar

Defines an integer data type. Used for columns that store whole numbers (both positive and negative).

StarStarStarStar

FULL OUTER JOIN

StarStarStarStar

Returns all records when there is a match in either left or right table. Those not matching will have NULL values for every column of the table with no match.

StarStarStarStar

DELETE

StarStarStarStar

Removes records from a table. Used to delete data from a database.

StarStarStarStar

ORDER BY

StarStarStarStar

Sorts the result-set by one or more columns. Used to organize output data either in ascending or descending order.

StarStarStarStar

UNION ALL

StarStarStarStar

Combines the result sets of two or more SELECT statements. Used when wanting to return all records (including duplicates) from multiple tables.

StarStarStarStar

NULL

StarStarStarStar

Represents a missing or unknown value in a database. Used in columns where data is optional or not available.

StarStarStarStar

CREATE TABLE

StarStarStarStar

Creates a new table in the database. Allows the specification of columns and their data types.

StarStarStarStar

HAVING

StarStarStarStar

Filters records that work on summarized GROUP BY results. Used when an aggregate condition has to be applied after data is grouped.

StarStarStarStar

UPDATE

StarStarStarStar

Modifies existing records in a table. Used to change data within a table.

StarStarStarStar

RIGHT JOIN

StarStarStarStar

Returns all records from the right table and the matched records from the left table. The result is NULL from the left side if there is no match.

StarStarStarStar

INDEX

StarStarStarStar

Creates a database index on one or more columns. Used to speed up the retrieval of data by creating a data structure that improves data access times.

StarStarStarStar

INNER JOIN

StarStarStarStar

Returns records that have matching values in both tables. Used to select rows from two or more tables that satisfy the join condition.

StarStarStarStar

IN

StarStarStarStar

Specifies multiple possible values for a column. Used within a WHERE clause to filter results according to a list of values.

StarStarStarStar

JOIN

StarStarStarStar

Combines rows from two or more tables based on a related column. Used to merge rows from different tables with a common key.

StarStarStarStar

DISTINCT

StarStarStarStar

Removes duplicate records from the results of a SELECT query. Used when unique records are required from a column or set of columns.

StarStarStarStar

CROSS JOIN

StarStarStarStar

Produces a Cartesian product of the two tables. Used to join every row of one table with every row of another table.

StarStarStarStar

INSERT INTO

StarStarStarStar

Adds a new row to a table. Used to add a new record to a table in the database.

StarStarStarStar

ALTER TABLE

StarStarStarStar

Modifies the structure of an existing table. Used to add, delete, or modify columns in a table.

StarStarStarStar

UNION

StarStarStarStar

Combines the result sets of two or more SELECT statements. Used when wanting to return all records (no duplicates) from multiple tables.

Know
0
Still learning
Click to flip
Know
0
Logo

© Hypatia.Tech. 2024 All rights reserved.