At the Gate location you met the asterisk
*. It is convenient, but it carries scrolls you never wanted.1SELECT * FROM ksiazki;The Library returns all fields:
id, tytul, autor_id, kategoria_id, rok_wydania, cena, dostepna. Often that is too much - like asking the scribe for an entire cabinet when you need a single card.When you name the fields separated by commas, you get exactly what you want:
1SELECT tytul, cena FROM ksiazki;This means: "Show me the title and price of every book - nothing more".
The order of columns in the result follows the order on the SELECT list:
1SELECT cena, tytul FROM ksiazki;Here the price appears before the title. You can name as many fields as you like - two, three, however many - as long as they are separated by commas:
1SELECT tytul, cena, rok_wydania FROM ksiazki;Leave the asterisk for a quick scouting glance over an unknown shelf; in daily work, choose your fields deliberately.