Article From:https://www.cnblogs.com/hello-dummy/p/9216963.html

Simple query: DQL

The simplest way to query is: SELECT column name 1, column name 2, column name 3…
FROM Table name;

Query all columns: SELECT * FROM table name

Duplicate removal:
SELECT DISTINCT name FROM t_student

The algorithm for realizing Mathematics:
SELECT (age+100) FORM t_student

Set the alias of the column: take the alias: age -> AGE
SELECT id,name,email,age+100 AGE FROM t_student

Set up display format query:

Link of this Article: Data query language DQL

Leave a Reply

Your email address will not be published. Required fields are marked *