IN Vs OR operator which is best to use sql server.
Answer Posted / harinireddy
in is peferable bcoz
by using in we can write set of values at time n check it
where as when we use or we need to mention for each n every
value
like ...
select emp_id from employee where emp_id in(1,2,3,4..)
but in case of or...
select emp_id from employee where emp_id=1 or emp_id=2 or
emp_id=3 or emp_id=4...
Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is a result set object returned by mssql_query()?
explain what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration
what is difference between view and Dip.
What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas
This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?
What are the steps to follow to configure SQL*Net?
What are click through reports?
What is log shipping?
Why variables called the most powerful component of ssis?
How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
What do you do in data exploration
difference between Clustered index and non clustered index ?
What is a transaction and why is it important?
What are statistics?
What is raid and what are different types of raid levels?