Introducere in SQL Flashcards

1
Q

SQL este case sensitive ?

A

nu este.

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

String-urile se scriu intre ghilimele simple sau duble ?

A

si simple si duble insa se recomanda cele simple.

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

Cu ce semn incep intotdeauna variabilele SQL ?

A

@

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

Intre ce tipuri de ghilimele se pot scrie obiectele de ex my_table ?

A

ghilimele backtick my_table

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

De ce se recomanda a se folosi ghilimele simple la scrierea string-urilor ?

A

datorita modului ANSI_QUOTES care poate fi activat pe server si care va trata ghilimelele duble ca si identificatori.

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

Cate tipuri de string-uri sunt ? si care este diferenta dintre ele ?

A

binare si nebinare

diferenta dintre ele este ca cele binare se salveaza in bytes iar cele nebinare in caractere

ptr string-urile binare nu se poate defini setul de caractere si colatiuni

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

Care sunt cele 10 caractere escape din SQL ?

A
\0 - null 0x00
\t  - spatiu tab
\b - backspace
\r  - intoarcere la inceputul randului
\n - rand nou
\'  - ghilimele simple
\" - ghilimele duble
\% - procent
\_ - underline
\\ - backslash
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Ce tipuri de comentarii exista in SQL ?

A

uniliniar #comment sau –comment

multilinie
 /* 
comments
...
 */

si mai exista comentariile conditionate care sunt valabile doar pe serverul MySQL:

/*! MySQL-specific code */

Acest cod se va executa pe serverul MySQL

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

Cate tipuri de instructiuni exista in SQL?

A

3 tipuri si anume:

DML - Data Manipulation Language
DDL - Data Definition Language
DCL - Data Control Language

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

Care sunt instructiounile DML ?

A

4 si anume

SELECT
INSERT
UPDATE
DELETE

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

Care sunt instructiounile DDL ?

A

CREATE
ALTER
DROP

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

Care sunt instructiounile DCL ?

A

GRANT

REVOKE

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