Back Home
  • Examples
  • Sample Database
#1
SELECT 
    customername, state, country
FROM
    customers
ORDER BY country;
#2
SELECT 
    customername, IF(state IS NULL, 'N/A', state) state, country
FROM
    customers
ORDER BY country;
#3
SELECT customername, 
       IFNULL(state,"N/A") state, 
       country
FROM customers
ORDER BY country;
Table List
customers
SELECT * FROM customers;
employees
SELECT * FROM employees;
offices
SELECT * FROM offices;
orderdetails
SELECT * FROM orderdetails;
orders
SELECT * FROM orders;
payments
SELECT * FROM payments;
productlines
SELECT * FROM productlines;
products
SELECT * FROM products;
  • SQL Query
​x
 
1
​
Execute
Clear Beautify Minify
  • Result