SQL Basics Flashcards
(71 cards)
What is a table?
a collection of related data entries and it consists of rows and columns
data is stored in database objects called?
tables
every table is broken up into smaller entities called?
fields
What is a field?
a column in a table designed to maintain specific information about every record in the table
What is a record?
a row / each individual entry that exists in a table
CRUD operations
CREATE
READ
UPDATE
DELETE
which SQL clause extracts data from a database
SELECT
which SQL clause updates data in a database
UPDATE
which SQL clause deletes data in a database
DELETE
which sql clause inserts new data into a database
INSERT INTO
which sql clause creates a new database
CREATE DATABASE
which sql clause modifies a database
ALTER DATABASE
which sql clause creates a new table
CREATE TABLE
which sql clause modifies a table
ALTER TABLE
which sql clause deletes a table
DROP TABLE
which sql clause creates an index (search key)
CREATE INDEX
which sql clause deletes an index
DROP INDEX
which sql statement returns only distinct (different) values
SELECT DISTINCT
how can we return the number of different countries (example)
SELECT COUNT(DISTINCT Country)
how do we filter records
with the WHERE clause and extracts only records that fulfill a specified condition
is the WHERE clause only used in SELECT statements?
NO! Also used in UPDATE, DELETE, etc.
what clause is used to specify between a certain range
BETWEEN
which clause is used to search for a pattern
LIKE
operator not equal
<>