- DDL: Data definition language: create the table, alter and drop.
- DCL: Data Control Language: grant, revoke
- DML: Data Management Language. insert, update, delete, get
Recommended style: snake case, lowercase
Second most popular: camel case
select * from table_name
This will return all the entries in the given table_name.
MYSQL vs SQL
SQL is a structured query language to manage a relational database.
MYSQL is a relational database management system to store the data retreive modify using sql. MYSQL is a platform, software, providing an integrated tool environment designed to model databases. Also provides database drivers in .net .php, c++, Python ,Java to build a database applications.
Database Drivers: We pass a query string to connect with a language of the front end.
Primary Key: We identify the table using the primary key and the foreign key.
Has aliases to shorten names that are too long..
Has aggregate functions (min (), max(), count(), sum(), avg())
-- This is how to make a commentselect * from customers
-- * grabs all the columns
You can comment out multiple lines of SQL in multiple ides with
To grab a specific column in the table we can use the following syntax.
select name_of_column from table_name