SQL Commands (BASIC) Flashcards Preview

SQL > SQL Commands (BASIC) > Flashcards

Flashcards in SQL Commands (BASIC) Deck (16)
Loading flashcards...
1

Creates a database schema

CREATE SCHEMA AUTHORIZATION

2

Creates a new table in the user's database schema

CREATE TABLE

3

Ensures that a column will not have null values

NOT NULL

4

Ensures that a column will not have duplicate values

UNIQUE

5

Defines a primary key for a table

PRIMARY KEY

6

Defines a foreign key for a table

FOREIGN KEY

7

Defines a default value for a column (when no value is given)

DEFAULT

8

Validates data in an attribute

CHECK

9

Creates an index for a table

CREATE INDEX

10

Creates a dynamic subset of rows and columns from one or more tables (see Lesson 4, Advanced SQL)

CREATE VIEW

11

Modifies a table's definition (adds, modifies, or deletes attributes or constraints)

ALTER TABLE

12

Creates a new table based on a query in the user's database schema

CREATE TABLE AS

13

Creates a new table based on a query in the user's database schema

CREATE TABLE AS

14

Permanently deletes a table (and its data)

DROP TABLE

15

Permanently deletes an index

DROP INDEX

16

Permanently deletes a view

DROP VIEW