-
Notifications
You must be signed in to change notification settings - Fork 0
/
regras.txt
32 lines (30 loc) · 1009 Bytes
/
regras.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CREATE DATABASE <id>;
USE <id>;
CREATE TABLE <id> (<id> <tipo> [, <id> <tipo>]*); FEITO
INSERT INTO <id> (<id> [, <id>]*) VALUES (<valor> [, <valor>]*) [, (<valor> [, <valor>]*)]*; FEITO
SELECT * FROM <id>; FEITO
SELECT <id> [, <id>]* FROM <id>; FEITO
SELECT * FROM <id> ORDER BY <id>; FEITO
SELECT * FROM <id> WHERE <id> = <valor>; FEITO
UPDATE <id> SET <id> = <valor> WHERE <id> = <valor>; FEITO
DELETE FROM <id> WHERE <id> = <valor>;
TRUNCATE TABLE <id>;
S -> create (table ID \( ID TIPO PT \) | database ID) ;
| insert INSERT ;
| select SELECT WHERE ORDER ;
| update ID set ID VALOR WHERE ;
| delete FROM WHERE ;
| truncate table ID ;
| use ID ;
TIPO -> ID
INSERT -> into ID \( ID P \) values \( VALOR VALOR_VARIOS \)
SELECT -> (*|ID P) FROM
WHERE -> (where ID = VALOR)?
ORDER -> (order by ID)?
FROM -> from ID
ID -> [a-z]([a-z0-9])*
VALOR -> ([a-z]([a-z0-9])*|[0-9]*)
VALOR_VARIOS -> , VALOR VALOR_VARIOS
PT -> , ID TIPO PT
P -> , ID P
MAIN -> S*