Distinct-Limit-Orderby-AndOr In database Concepts and Some Query Tips
DISTINCT: (SELECT DISTINCT city FROM customers.
ORDER BY: used at the end of query.
AND: All of the tests must be true.
OR: Only one of them need to be true.
- Q: We want all customer' city, name and id number whose id is 1 or 2 and live in Istanbul?
IN: Instead of using 3 OR statements we can use IN keywords.
SELECT * FROM customer_all WHERE id IN (3, 5, 127, 1346) ORDER BY id
For more click here.
Ercan Duman
ercanduman30@gmail.com
admin@laranargilemalzemeleri.com
Comments
Post a Comment
Ask me anything here...