instructiunile de definitie SQL Flashcards

1
Q

Pentru ce se folosesc instructiunile de definitie ?

A

Pentru manipularea structurilor si obiectelor din baza de date precum:
baza de date
tabele
views, etc

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

Cum se creaza o baza de date ?

A

CREATE DATABASE/SECHEMA my_db;

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

Cum se sterge o baza de date ?

A

DROP DATABASE IF EXISTS my_db;

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

Adaugati o noua coloana intr-un tabel

A

ALTER TABLE my_table ADD COLUMN name varchar(50);

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

Cum putem afla codul de creare a unui anumit obiect din baza ?

A

SHOW CREATE DATABASE my_db;

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