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

What is wide table?

944


When cursors are useful?

1091


If you are given access to a SQL Server, how do you find if the SQL Instance is a named instance or a default instance?

1099


How many types of subqueries are there in sql server?

986


What is intellisense?

1044


How many types of schemas are there?

1038


How you can add messages to the nt event log from within a stored procedure?

1061


What is difference between Datepart() and Datename() in SqlServer?

1203


What is tabulation?

945


What is side by side migration in sql server?

1095


1 01 101 01010

2045


Can you move the resources after pausing the node? : sql server database administration

1093


how to take backup bcp out for a column in table in sql server?

2102


Explain what are partitioned views and distributed partitioned views?

939


What are the fixed server level roles? : sql server security

1119