Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between two queries:
1. SELECT * FROM table WHERE 1=1;
2. SELECT * FROM table

Answer Posted / skumar

Both are returns the SAME results.

I dont know the meaning of the
SELECT * FROM Table_Name WHERE 1=1
SELECT * FROM Table_Name WHERE 2=2
SELECT * FROM Table_Name WHERE 5=5
SELECT * FROM Table_Name WHERE 100=100
.
.
.
etc..,

It accepts the where both are equal.

If you give like

SELECT * FROM Table_Name WHERE 100=1001
It is not accept.

Is This Answer Correct ?    34 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you tell if a database object is invalid?

1075


Different types of keys in SQL?

1103


Does view occupy space?

950


What happens if null values are involved in bitwise operations?

1033


How to use order by with union operators in ms sql server?

1025


What is a partition key?

960


What method is used by the Command classes to execute SQL statements that return single values?

1075


plss anybody specify tha constrian management system in dbms

2154


What is b tree index?

920


What is attribute hierarchy? : sql server analysis services, ssas

1028


What are the difference between clustered and a non-clustered index?

1045


What are the options which must be set to allow the usage of optimistic models?

965


Write a SQL query in order to merge two different columns into single column?

1039


Explain the difference between functions and stored procedures in sql server?

984


How to enable/disable indexes?

1070