Categories: MySQL

MySQL BETWEEN & Alias

Share

To specify a range of test you can use BETWEEN operator.

Example of BETWEEN:

SELECT * FROM users WHERE age BETWEEN 18 AND 55;

Here below 18 and above 55 aged user will be eliminated.

For your own understand you can give an alias name to a column while getting the data from a table. This is called alias.

SELECT first_name AS `name` FROM users WHERE age BETWEEN 18 AND 55;

Recent Posts

Unveiling the Truth: Is the Spread of Sinus Infections a Myth or Reality?

Sinus infections, impacting approximately 31 million Americans each year, represent a significant health concern stemming…

17 hours ago

ARTIFICIAL INTELLIGENCE: Advantages And Disadvantages? Everything You Need to Know

Pros And Cons Of AI: Artificial Intelligence directly translates to conceptualizing and building machines that…

1 day ago

Four common mistakes when picking an internet provider

We all live on the internet; we use it for everything. Thus, when it comes…

1 day ago

What Is Commonly Misdiagnosed as Pink Eye: Understanding Eye Conditions and Their Symptoms

Introduction: Pink eye, or conjunctivitis, is a common eye condition characterized by redness and inflammation…

2 days ago

Why Flexible Financing is the Future of Small Business

Small businesses are the backbone of the economy. Still, they often face daunting hurdles when…

2 days ago

Warm Comfort: Choosing the Best Hot Water Bottle for Cozy Nights

Introduction: As the chill of winter settles in or a bout of cold weather strikes,…

3 days ago