Preview

1. Being the president to being a homeless person

Satisfactory Essays
Open Document
Open Document
1831 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
1. Being the president to being a homeless person
SQL: SELECT Statement
Learn how to use the SQL SELECT statement with syntax, examples, and practice exercises.
Description
The SQL SELECT statement is used to retrieve records from one or more tables in your SQL database.សេចក្តីថ្លែងការណ៍ SQL ដែលបានជ្រើសត្រូវបាន ប្រើដើម្បីទាញយកកំណត់ត្រា ពីតា រាង មួ យឬ ច្រើននៅក្នុងមូលដ្ឋានទិន្នន័យ SQL របស់អ្នក។
Syntax
The syntax for the SQL SELECT statement is:
SELECT expressions
FROM tables
WHERE conditions;

Example - Select all fields from one table
Let's look at an example showing how to use the SQL SELECT statement to select all fields from a table.ចូរក្រឡេកមើលឧទាហរណ៏ដែលបង្ហាញពីរបៀបប្រើសេចក្តីថ្លែងការណ៍ SQL ជ្រើសដើម្បីជ្រើសវាលទាំងអស់ពីតារាងមួយ។
SELECT *
FROM suppliers
WHERE city = 'Newark'
ORDER BY city DESC;

In this SQL SELECT statement example, we've used * to signify that we wish to view all fields from the suppliers table where the supplier resides in Newark. The result set is sorted by city in descending order.នៅក្នុងឧទាហរណ៍នេះសេចក្តីថ្លែងការណ៍ SQL ការជ្រើសរើសនេះយើងបានប្រើ * ដើម្បីបញ្ជាក់ថាយើងមានបំណងដើម្បីមើលវាលទាំងអស់ពីតារាងដែលជាកន្លែងដែលផ្គត់ផ្គង់អ្នកផ្គត់ផ្គង់រស់នៅ Newark ។ សំណុំលទ្ធផលត្រូវបានតម្រៀបតាមលំដាប់ចុះទីក្រុងក្នុងលំដាប់។

Example - Select individual fields from one table
You can also use the SQL SELECT statement to select individual fields from the table, as opposed to all fields from the table.
For example:
SELECT supplier_name, city, state
FROM suppliers
WHERE supplier_id > 1000
ORDER BY name ASC, city DESC;
This SQL SELECT example would return only the supplier_name, city, and state fields from the suppliers table where the supplier_id value is greater than 1000. The results are sorted by supplier_name in ascending order and then city in descending order.ឧទាហរណ៍ជ្រើស SQL ដែលនេះនឹងត្រឡប់តែ supplier_name នេះទីក្រុងនិងវាលរដ្ឋពីតារាងផ្គត់ផ្គង់ដែលមានតម្លៃ supplier_id ធំជាង 1000 ។ លទ្ធផលនេះបានត្រូវបានតម្រៀបតាម supplier_name ក្នុងលំដាប់ឡើងហើយបន្ទាប់មកទីក្រុងតាមលំដាប់
SQL: GROUP BY

You May Also Find These Documents Helpful