write down the sql query?
Table Name : emp1
empid empname
1 bala
2 guna
Table Name : emp2
empid empname
1 <Null>
2 <Null>
Solution : emp1 names are updated in emp2, write a query?
Answer Posted / vicky
update emp2 e2 set e2.empname = (select e1.empname from
emp1 e1 where e2.empid=e1.empid)
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Will sql server 2005 allow you to reduce the size of a column?
How to perform backup for certificates in sql server? : sql server security
Tell me what is difference between clustered and non clustered index?
Is it possible to call a stored procedure within a stored procedure?
State the difference between local and global temporary tables?
How can I create a report based on a query? : sql server management studio
List the various tools available for performance tuning?
Write a query to include a constraint, to check whether the employee salary is greater than 5000?
Do you know sql server 2008 backup compression?
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 does truncate do?
What is the cartesian product of the table?
What are the limitations/drawbacks or ssrs 2008 r2?
What are relationships and mention different types of relationships in the dbms
What is dbcc command in sql server?