-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfull_script.sql
More file actions
21 lines (18 loc) · 948 Bytes
/
full_script.sql
File metadata and controls
21 lines (18 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- Create schema
CREATE SCHEMA example_schema;
-- Create Table
CREATE TABLE example_schema.usuario (
id INT NOT NULL AUTO_INCREMENT,
nome VARCHAR(45) NULL,
telefone INT NULL,
email VARCHAR(45) NULL,
PRIMARY KEY (id));
-- Insert some data
INSERT INTO example_schema.usuario (id, nome, telefone, email) values (1, 'Homer Simpsons', '99999999', 'homer@fox.com');
INSERT INTO example_schema.usuario (id, nome, telefone, email) values (2, 'Jhon Snow', '99991234', 'jhon@got.com');
INSERT INTO example_schema.usuario (id, nome, telefone, email) values (3, 'Rick Grimes', '67899999', 'rick@twd.com');
INSERT INTO example_schema.usuario (id, nome, telefone, email) values (4, 'Steve Jobs', '456745679', 'steve@apple.com');
INSERT INTO example_schema.usuario (id, nome, telefone, email) values (5, 'Magic Jadson', '85765687', 'magic@gmail.com');
-- Count open connections
SHOW processlist;
SHOW STATUS WHERE variable_name = 'Threads_connected';