Home  >  Article  >  Database  >  SQL 必知必会笔记2检索和排序数据

SQL 必知必会笔记2检索和排序数据

WBOY
WBOYOriginal
2016-06-07 17:40:44888browse

1.检索数据 使用SELECT 检索表数据,必须至少给出两条信息想选择什么, 以及从什么地方选择。 检索不同的值 使用DISTINCT关键字,检索不同的值,使用示例: SELECT DISTINCT vend_id FROM Products;

1.检索数据

使用SELECT 检索表数据,必须至少给出两条信息——想选择什么, 以及从什么地方选择。

 

检索不同的值

使用DISTINCT关键字,网站空间,检索不同的值,美国空间,使用示例:

SELECT DISTINCT vend_id FROM Products; ,香港虚拟主机

Statement:
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