Welcome Back

Google icon Sign in with Google
OR
I agree to abide by Pharmadaily Terms of Service and its Privacy Policy

Create Account

Google icon Sign up with Google
OR
By signing up, you agree to our Terms of Service and Privacy Policy
Instagram
youtube
Facebook

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: