0% found this document useful (0 votes)
46 views11 pages

MySQL Commands: DDL, DML, DQL Overview

The document discusses different SQL statements including DDL, DML, DCL, and DQL. It provides examples of DDL statements such as CREATE TABLE, ALTER TABLE, and DROP TABLE which are used by database administrators to define and modify the database schema. It also gives examples of DQL statements like SELECT which are used to query the database and retrieve data. The document also describes how to use the tee command to log MySQL queries and output to a text file for review.

Uploaded by

Neelam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views11 pages

MySQL Commands: DDL, DML, DQL Overview

The document discusses different SQL statements including DDL, DML, DCL, and DQL. It provides examples of DDL statements such as CREATE TABLE, ALTER TABLE, and DROP TABLE which are used by database administrators to define and modify the database schema. It also gives examples of DQL statements like SELECT which are used to query the database and retrieve data. The document also describes how to use the tee command to log MySQL queries and output to a text file for review.

Uploaded by

Neelam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

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;

You might also like