Common SQL Data Types Flashcards

1
Q

NUMBER(L,D)

A

The declaration NUMBER(7,2) indicates numbers that will be stored with
two decimal places and may be up to seven digits long, including the sign
and the decimal place. Examples: 12.32, -134.99.

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

INTEGER

A

May be abbreviated as INT. Integers are (whole) counting numbers, so they
cannot be used if you want to store numbers that require decimal places.

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

SMALLINT

A

Like INTEGER but limited to integer values up to six digits. If your integer
values are relatively small, use SMALLINT instead of INT.

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

DECIMAL(L,D)

A

Like the NUMBER specification, but the storage length is a minimum
specification. That is, greater lengths are acceptable, but smaller ones are not.
DECIMAL(9,2), DECIMAL(9), and DECIMAL are all acceptable.

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

CHAR(L)

A

Fixed-length character data for up to 255 characters. If you store strings that
are not as long as the CHAR parameter value, the remaining spaces are left
unused. Therefore, if you specify CHAR(25), strings such as Smith and
Katzenjammer are each stored as 25 characters. However, a U.S. area code
is always three digits long, so CHAR(3) would be appropriate if you wanted
to store such codes.

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

VARCHAR(L) OR VARCHAR2(L)

A

Variable-length character data. The designation VARCHAR2(25) will let you
store characters up to 25 characters long. However, VARCHAR will not leave
unused spaces. Oracle automatically converts VARCHAR to VARCHAR2.

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

DATE

A

Stores dates in the Julian date format.

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