Skip to content

Tag: sql

Comparing TIMEDIFF in MySQL

I have these following data: and the following query that I want to use to find all the entries where the timediff is lesser than 50 hours The second row should be returned because it’s lesser than 50 hours, but the first row, which the timediff is more than 50 hours keep returning as well. It returns a…

What is the difference between NOT and != operators in SQL?

What is the difference between NOT and != operators in SQL? I can’t understand the difference. I guess they are same. Answer NOT negates the following condition so it can be used with various operators. != is the non-standard alternative for the <> operator which means “not equal”. e.g…