Please enable JavaScript.
Coggle requires JavaScript to display documents.
Mysql - Coggle Diagram
Mysql
Comand (CRUD)
Create
Table
Inserting primery key in table
ALTERE TABLE Table_Name ADD PRIMARY KEY (Column_Name);
Inserting a column in table
ALTER TABLE Table_name ADD COLUNM (Column_Name);
Inserting values in table's columns
INSERT INTO Table_Name (Columns_Name) VALUE ( 'Values' );
Deleting a table
DROP TABLE Table_Name;
Changing multple lines
UPDATE Table_name SET Column_name WHERE Column_name = 'value';
Database
Creating a database
CREATE DATABASE Database_Name;
Deleting a database
DROP DABASE Database_name;
Read
Consultas
SELECT * FROM Name_Table;
SELECT Column_name FROM Table_name;
SELECT Column_name AS new_column_name FROM table_name;
SELECT Column_name FROM Table_name LIMIT 5;
USE Name-Database;
Filtros
SELECT * FROM table_name WHERE column_name = 'value';
Update
UPDATE Table_Name SET Column_Name = 'new_value'
WHERE Primary_Key'_Column = Key;
Delete
DELETE FROM Name_Table WHERE Name_column_key = 'key';