SQL Flashcards

1
Q

Statement

A

A statement is a text that the database recognizes as a valid command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Clause

A

SQL commands commonly appear as capitals in statements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Parameter

A

A parameter is a list of columns, data types, or values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Integer data type

A

A whole number between -2147483648 and 2147483647. Postgres also includes alternativessmallintandbigint.

real: A floating-point type with variable precision with a maximum range of 6 decimals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Real data type

A

A floating-point type with variable precision with a maximum range of 6 decimals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Text data type

A

A range of characters of unlimited length.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Char data type

A

A range of characters of fixed lengthn, an error will be raised for any entries that exceed lengthn. Entries that are shorter thannwill be space-padded.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Varchar data type

A

A range of characters of variable length with a maximum lengthn. However, unlikecharthere is no space padding to extend entries shorter thann.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Date data type

A

A date (without any time value), such as 2022-06-21 (ISO 8601 format) and 6/21/2022.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

CREATE TABLE

A

A clause that tells SQL you want to create a new table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

INSERT INTO

A

A clause that adds the specified row or rows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

VALUES

A

A clause that indicates the data being inserted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

ALTER TABLE

A

A clause that lets you make the specified changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

ADD COLUMN

A

This clause lets you add a new column to a table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

UPDATE

A

Edits a row in a table. You can use the UPDATE statement when you want to change existing records.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

DELETE

A

A statement deletes one or more rows from a table. You can use the statement when you want to delete existing records.

17
Q

SELECT

A

Select statements are used to fetch data from a database.

18
Q

“*” WILD CARD

A
  • is a special wildcard character. It allows you to select every column in a table without having to name each one individually.