user18760967
user18760967

Reputation: 1

SQL Commands Concept

SELECT * FROM Customers
ORDER BY Country>1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;

I want to know when that compares the value of Country and 1000...,

1:what is the result after comparison?

2:what is the value of Country in this comparasion(askicode or....)? (Country is string like usa uk and some thing like that)

Upvotes: 0

Views: 70

Answers (1)

Luuk
Luuk

Reputation: 14979

Do this select:

SELECT *, Country>1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 as Comparision
FROM Customers
ORDER BY Country>1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;

This will add a new column, with the name (=alias) Comparison. This will show the value of that expression.

Upvotes: 1

Related Questions