Instagram
youtube
Facebook
Twitter

Find Out of Stock Products in SQL

Find Out of Stock Products in SQL

Products Table:

Query Explanation:

SELECT * – Retrieves all columns from the table.
FROM Products – Specifies that data is to be fetched from the Products table.
WHERE UnitsInStock = 0 – Filters the results to show only products that are out of stock (i.e., stock is 0).

SQL Query:

USE SalesInventoryDB;

SELECT *  
FROM Products  
WHERE UnitsInStock = 0;

 

Output: