Hello! I'm in training in Support and I'm having a hard time understanding the logic of select, I need to do script for example: bring the statuses of the Criteria table.
Hello! I'm in training in Support and I'm having a hard time understanding the logic of select, I need to do script for example: bring the statuses of the Criteria table.
Your SQL would be this:
SELECT status FROM Critérios
The logic is as follows:
A query SELECT
always produces a result table.
All records in the Critérios
table are searched. No filter is applied, and therefore all records are returned (if you wanted to filter, a WHERE
clause would be required). Each record found will correspond to one row of the table.
The column status
of the records obtained is selected. You could select more columns, but since you're only selecting this, your table will contain only the status
column and nothing else.
As a result, you will have a list of all statuses in the Critérios
table. There may be repetitions if several different records of the Critérios
table have the same status
.