Basically this. I wonder if someone would use ALL
instead of *
, since I'm building automatized SELECT
queries. Currently, if someone wants to select everything, the query will just use *
.
SELECT ALL
means ALL rows, i.e including duplicate rows. (The opposite is SELECT DISTINCT
, where duplicate rows are removed.) ALL
is the default, and most people write just SELECT
instead of SELECT ALL
.
SELECT *
means all columns.
Note: When it comes to e.g. UNION
suddenly DISTINCT
is the default. So just UNION
means UNION DISTINCT
, i.e. duplicate rows are removed. Here you have to specify UNION ALL
to keep duplicate rows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With