SQL - Selected Rows &Selected columns

In the context of data tables, spreadsheets, or programming (like using Excel, SQL, or Python with pandas), "selected rows" and "selected columns" refer to specific parts of a dataset that are being focused on, extracted, or manipulated.

Selected Rows

These are specific horizontal entries in a table or dataset that have been chosen based on some criteria.

In SQL:

  • SELECT * FROM employees WHERE department = 'Sales';
    

    This selects rows where the department is Sales

    Selected columns

  • In SQL:

    SELECT name, salary FROM employees;
    

    This selects only the "name" and "salary" columns.