There is a table1 with records (1,2,3,4,5,6) and table2
with records (4,5,6,7,8,9).write a query so as to get the
result as 1,2,3,4,5,6,7,8,9
Answer Posted / jagadeesh
select isnull(a.id,b.id) from table1 a
full outer join table2 b
on a.id=b.id
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How can I change procedure name in sql server?
What is the impact on other user sessions when creating indexes?
What are audit control procedures?
What is the simplest way to create a new database in ms sql server?
What are the new features of sql server 2008 r2 reporting service?
Can a database be shrunk to 0 bytes, if not, why?
How to call a function from a stored procedure in SQL Server ?
how can you attach more than 20 ldf files in sql server
How to delete database objects with "drop" statements in ms sql server?
What is a primary index?
What are “lock” hints?
How to Check if table exists in sql server?
What is query processing?
Can I save my report as html, excel or word? : sql server management studio
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?