You've got the hang of it already, haven't you? Let's combine what we know about conditional operators with selecting specific columns.
SELECT id, age FROM user WHERE age <= 21;
Easy, right? Instead of the asterisk (*), we just name the specific columns we're interested in.
Syntax
SELECT column_name1,column_name2,.. FROM table_name WHERE column_name<=value;
Execute below code
SELECT brand,model,production_year FROM car WHERE price<=10000;
BRAND
MODEL PRODUCTION_YEAR
Ford Focus 2005
Volkswagen Golf 1992
Volkswagen Jetta 2003
Fiat Punto 1999
No comments:
Post a Comment