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

Answers were Sorted based on User's Feedback



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

Answer / hitesh taneja

When we use 1=1 or any condition which is always going to
true, it will take extra bit of time bcoz it is a condion so
althouth the output of the query will be the same the
performance time will be bit higher with condition.

Is This Answer Correct ?    4 Yes 0 No

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

Answer / vidit

The results of both queries will be same
but 2nd will fast then 1st

vidit Tyagi
Meerut

Is This Answer Correct ?    5 Yes 2 No

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

Answer / niranjan prasad

There is no defference in result. It shows same result-set
by using both the command.This question put you to misguide
only.

Is This Answer Correct ?    4 Yes 2 No

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

Answer / chinnu

Hi SQL gurus,

i am working for an MNC...

My team is having a problem in sql server. when user slects
date prompts from jan 1st to april 30, it should display
all months data like :

jan aa
feb bb
mar cc

but when it comes to april its taking data like :

jan aa
feb bb
mar cc
apr dd...and so on

means its taking data again from jan to april which we dont
want. we want the data only april month as we are getting
jan, feb and mar...

can any one write the code to relsove the issue please

would be greatful if you can send to shiva_sans@yahoo.co.in

and also please send your email also ...so that we will be
in touch for any kind of queries ...


Thanks a lot in Advance !!!

Is This Answer Correct ?    1 Yes 0 No

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

Answer / rohit nanda

NO DIFFERENCE IN BOTH THE EQUATION...BCOZ THEY GIVE THE SAME
OUTPUT....

Is This Answer Correct ?    2 Yes 1 No

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

Answer / kohulavani.g

First query,in table where 1=1 condition is satisfied that
row or column is displayed
But in second query,the whole table is displayed

Is This Answer Correct ?    18 Yes 44 No

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

Answer / kranthi kiran

I am learning SQL Basics..So If my Answer is wrong Plz do
reply to tht,
In the First Query Where 1=1 implies Show all where The
first coloum element is equal to 1

and second query show all from table

Is This Answer Correct ?    4 Yes 40 No

Post New Answer

More SQL Server Interview Questions

Can you create UNIQUE and PRIMARY KEY constraints on computed columns in SQL Server 2000?

3 Answers   Infosys,


statement (of account) Receive ID_receive Date_receive Amount_receive TO_receive From_receive Description_receive 1 2010/01/01 500 Bank Ahmed Payment from the account 2 2010/02/01 700 Bank Ahmed Payment from the account Payment ID_payment Date_payment Amount_payment From_payment To_payment Description_payment 1 2010/03/01 1000 Ahmed Sales Sale goods 2 2010/04/01 1500 Ahmed Sales Sale goods How can crate Stored Procedures for the statement (of account) from these tables? I want statement (of account) like this: (in sql 2005) ID_ name description debit account credit account balance

1 Answers  


How to defragment indexes with alter index ... Reorganize?

0 Answers  


About types of indexes in SQL server ?

2 Answers   Cognizant,


What is optimistic concurrency?

0 Answers  


Can select statements be used on views in ms sql server?

0 Answers  


What is the command used to check locks in microsoft sql server?

0 Answers  


What is an indexing technique?

0 Answers  


What is sql server programming?

0 Answers  


What are the different ways you can create databases in sql server?

0 Answers  


diffrence between function and procedure

5 Answers   Wipro,


what is the difference between table and view

1 Answers  


Categories