คืนค่าการตั้งค่าทั้งหมด
คุณแน่ใจว่าต้องการคืนค่าการตั้งค่าทั้งหมด ?
ลำดับตอนที่ #4 : SQL II - Process Search Results
Processing
Results
Omitting
Duplicate Data
DISTINCT
By using DISTINCT you can exclude duplicate rows of data from your
search results. You can specify the name of a column to get only unique rows,
omitting duplicates. To do this, use the following syntax: DISTINCT( column_name )
Using
DISTINCT
As shown below, you can use DISTINCT in a SELECT statement to omit duplicate rows. In the example, the statement gets rows of the name column from the purchases table with duplicates excluded.
Using
Arithmetic Operators
Arithmetic Operators
It's possible to do calculations in SQL with the
these arithmetic operators:
+ (addition), -
(subtraction), / (division), and * (multiplication). As shown below, using these
operators, you can perform calculations on the rows of a specified column.
Using Arithmetic Operators
In order to get the price with tax, we will multiply the price column by 1.09 (for a 9% sales tax rate). Similar to using
DISTINCT, arithmetic operators can be used after the SELECT keyword in SQL
statements to get the resulting values of a calculation.
ความคิดเห็น