Introduction to SQL Statements
MySQL Commands
● DDL - Data Definition Language
● DML - Data Manipulation Language
● DCL - Data Control Language
● DQL - Data Query Language
MySQL Commands: Data Definition Language(DDL)
● Database language that is used to create, delete or modify
database schema is called DDL.
● It is used by Database Administrators(DBA) to specify the
conceptual schema.
● Normally, create, alter, and drop statements are DDL
statements.
● DDL statements make changes in the schema
DDL Statements
Create Table Statement:
DDL Statements:
Drop Table Statement:
Alter Table Command:
DQL: SELECT
SELECT Statement:
DQL: SELECT
SPECIFIC COLUMNS Statement:
DQL: Describe Statement
DESCRIBE Statement:
Tee Command:
● To log the output from more than one query -- either an entire MySQL client session, or part of a
session -- it's easier to use the MySQL tee command to send output to both (a) your console and (b) a
text file.
● This query creates a new plain text file and records each step.
● To get the logging process started, use the tee command at the MySQL client prompt, like this:
mysql> tee [Link];
● After you issue this tee command, you should see MySQL respond like this:
Logging to file '[Link]'
Notee Command
The tee file can be disabled with the notee command.
Syntax:
mysql> notee;