MySQL is a open-source, free and very popular relational database management system which is developed, distributed and supported by Oracle corporation.
- Open-source relational database management systems.
- Reliable, very fast and easy to use database server.
- Works on client-server model.
- Highly Secure and Scalable
- High Performance
- High productivity as it uses stored procedures, triggers, views to write a highly productive code.
- Supports large databases efficiently.
- Supports many operating systems like Linux*,CentOS*, Solaris*,Ubuntu*,Windows*, MacOS*,FreeBSD* and others.
mysql -u [username] -p [database];
```sql
exit;
```
CREATE DATABASE database_name;
USE database_name;
CREATE TABLE table_name(
col1_name datatype,
col2_name datatype,
coln_name datatype
);
INSERT INTO table_name VALUES(value,value,value);
UPDATE table_name
SET col1=value1,col2=value2
WHERE condition;
SELECT col_name FROM table_name;
SELECT * FROM table_name;
ALTER TABLE Table_name ADD column_name datatype;
TRUNCATE table table_name;
SELECT ... FROM t1 JOIN t2 ON t1.id1 = t2.id2 WHERE condition;
SELECT ... FROM t1 LEFT JOIN t2 ON t1.id1 = t2.id2 WHERE condition;
SELECT ... FROM t1 RIGHT JOIN t2 ON t1.id1 = t2.id2 WHERE condition;