Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Basic query of mysql field

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Basic query

/ *

Syntax:

Select Select, filter, View

Similar to System.out.println ("...") Printing

Features:

1. The query list can be: fields, constants, expressions, functions in the table

2. The result of the query is a virtual table

, /

You can print the name directly by clicking on the information name in the table on the left

Check the code f12 to standardize the style

Query a single field in the table to from to specify the table

SELECT last_name FROM employees

Multiple fields in a query table, separated by commas

SELECT last_name,salary,email FROM employees

Query all fields in the table

# the information name in the first click table is printed directly to the code

SELECT `first_ name`, `last_ name`, `email`, `salary`from employees

# second, select * (asterisk) from table name

SELECT * (asterisk) FROM employees

(the symbol to the left of 1) is an emphasis mark, not a single quotation mark, which is used to distinguish a field name from a keyword, plus an emphasis to indicate the field name

The selected code can be executed by selecting the mouse

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report