4. CREATE TABLE Flashcards

1
Q

Ce face instrucțiunea SQL CREATE TABLE?

A

Creează un tabel nou într-o bază de date.

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

Când folosim CREATE TABLE?

A

Când dorim să cream un tabel de la zero, specificând numele coloanelor și tipurile de date.

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

Care este structura de bază a unei instrucțiuni CREATE TABLE?

A
CREATE TABLE table_name (
    column_1 data_type constraint,
    column_2 data_type constraint,
    column_3 data_type constraint
);
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Ce reprezintă celebs în această instrucțiune?

CREATE TABLE celebs (
id INTEGER,
name TEXT,
age INTEGER
);
A

Numele tabelului care va fi creat.

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

Ce face această parte a instrucțiunii?

(id INTEGER PRIMARY KEY, name TEXT NOT NULL, age INTEGER)

A

Definește coloanele tabelului, tipurile de date și constrângerile acestora.

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