I see in many examples that contains "SELECT *" statement, even if clearly not all columns, or even any data is required/wanted.
Ok, it is handy. Perhaps if someone creates an universal guide just tries to make thing simple?
But what if I do want to get just one single record from one column? Does it matter if I do want the primary key, or not - is SELECT * good practice, or just lazy/practic thing that does not matter really?
I'd give an example: In many questions/examples of "how to use "EXISTS" I see such an solution:
(...) AND EXISTS (SELECT * FROM `table` WHERE ~~STATEMENT~~)
Why should I use *, when I celarly do not need ANY data at all - all what I wanted was to check if an record that matches the STATEMENT does exist in table, nothing more. So why everywhere I see "SELECT *"? Literally, in all blogs, artcles, guides I see "SELECT *" and noone even mention about any other solution.
My guess would be, that I should select the primary key just for the best preformance, like this:
(...) AND EXISTS (SELECT `primary_key_column` FROM `table` WHERE ~~STATEMENT~~)
Am I wrong?