Home > Database > Mysql Tutorial > How to use the select syntax of mysql

How to use the select syntax of mysql

王林
Release: 2023-06-01 19:37:53
forward
1837 people have browsed it

1. Keywords in SQL statements are not case-sensitive. SELECT is equivalent to SELECT, and FROM is equivalent to from.

2. To select all columns from the users table, you can use the symbol * to replace the column name.

Grammar

-- 这是注释
-- 从FEOM指定的[表中],查询出[所有的]数据. *表示[所有列]
SELECT*FROM
 
-- 通过从FROM从指定的[表中],查询出指定 列名称(字段)的数据
SELECT 列名称 FROM 表名称
Copy after login

Example

-- 注意:多个列之间,使用英文的逗号来分隔
select username,password from
Copy after login

The above is the detailed content of How to use the select syntax of mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template