SQL Flashcards

1
Q

Creating a Table Syntax

A

CREATE TABLE “Table Name”

([column1] [data type])

CREATE TABLE employee_num

(firstname varchar (15),

 lastname varchar (20),

 age number (3),

 salary (7,2) \<-- (0000000.00)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

CHAR(SIZE)

A

Fixed-length character string, Size is specified in parenthesis

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

VARCHAR(SIZE)

A

Variable-length character string. Max size is specified.

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

NUMBER(SIZE)

A

Number value with a max number of column digits

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

DATE

A

Date value

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

NUMBER(size,d)

A

Number value (Max number places, Max decimal places)

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

INSERT Data

A

INSERT into employee

(first, last, age, address, city, state)

VALUES ('Luke', 'Duke', 45, '2130 Boars Nest', 'Hazard Co', 'Georgia');
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly