9. Write a query to list a new column with the
difference in temp of the cities Delhi and Mumbai, Mumbai
and Jammu and soon. Consider the following table :
City_id City Temp.
1 delhi 40
2 Mumbai 35
3 Jammu 32
4 Pune 18
Answer Posted / pradip jain
select t1.name + ' and ' t2.name , t2.temp -t1.temp from
temp t1
join temp t2 on t2.id=t1.id+1
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is the difference between a function and a trigger?
Where in ms sql server is ’100’ equal to ‘0’?
How to define and use table alias names in ms sql server?
What do you mean by an execution plan? Why is it used? How would you view it?
How to call stored procedure using http soap?
Is it possible to call a stored procedure within a stored procedure?
What is "scheduled jobs" or "scheduled tasks"?
Explain what is it unwise to create wide clustered index keys?
What is the difference in accessing db between sql server vs sql azure?
What do you mean by acid?
What is index, cluster index and nonclustered index?
what are the three command line utilities and what are their primary functions?
What is replace and stuff function in sql server?
When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?
What is filestream?