The SELECT statement is the fundamental SQL command for retrieving data from a database. It allows us to select exactly the data we need, filter it, and display it in the desired format. It is the most frequently used SQL command, as we need it every time we want to read data from a database.
SELECT column1, column2, ... // column names we want to display FROM table_name// name of the table to retrieve data from
SELECT * FROM first_table;
SELECT first_name, last_name FROM first_table;
SELECT * FROM first_table WHERE age > 25;
SELECT * FROM first_table WHERE age BETWEEN 20 AND 30;
SELECT * FROM employees WHERE first_name BETWEEN "A" AND "M";
Thank you for visiting! Adding privacy policy.
© 2024 All rights reserved.
Vam je koda pomagala? Če želite podpreti moj trud pri pripravi vodičev in vzdrževanju strani, mi lahko namenite donacijo za kavo.