MySQL Language Syntax
Submitted by alpha_luna on Friday, July 10, 2015 - 23:12.
Good Day!!!
In this tutorial, we are going to learn about the MySQL Language Syntax and this is the continuation of MySQL Tutorials. My last work was all about the Installation of MySQL. In this Chapter, we will know how most actions on a database are performed using the SQL statements.SQL Statements
This is the free-form language for SQL, statements are the following:- Uppecase or Lowercase. Example: (SELECT, select and sELeCT are all considered identical keywords)
- As long as you don't split words, tokens or quoted strings in two, you can continue on the next line.
- You can start in any column.
- Be on the same line as other statements.

- Data Manipulation Language (DML)
- Data Definiton Language (DDL)
- SELECT - extracts data from a database
- UPDATE - updates data in a database
- DELETE - deletes data fro a database
- INSERT INTO - inserts new data into a database
- CREATE DATABASE - to create a new database
- ALTER DATABASE - to modify database
- CREATE TABLE - to create a new table
- ALTER TABLE - to modify table
- DROP TABLE - to delete a table
- CREATE INDEX - to create index (search key)
- DROP INDEX - to delete a index
Comments
The MySQL Server supports three comment styles:- #
- --
- /* */
- mysql> SELECT 1+1; # This comment
- continues TO the END OF line
- mysql> SELECT 1+1; -- This comment
- continues TO the END OF line
- mysql> SELECT 1 /* this is an
- in-line comment */ + 1;
- mysql> SELECT 1+
- /* this is a multi-line comment
- */ 1;
Add new comment
- 56 views