篩選和排序(SQL)
篩選和排序
丟棄某欄值重複的列
code:sql
SELECT DISTINCT column, another_column, …
FROM mytable
WHERE condition(s);
code:sql
SELECT column, another_column, …
FROM mytable
WHERE condition(s)
ORDER BY column ASC/DESC;
告訴資料庫你只需要結果中的某一部分
code:sql
SELECT column, another_column, …
FROM mytable
WHERE condition(s)
ORDER BY column ASC/DESC
LIMIT num_limit OFFSET num_offset;