Buy Questpond's video subscriptions on
huge discount
.
Online: 3225
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Interviews
>
.NET Framework
>
Loading ...
List the EmpNo,EName,Sal Daily Sal of all Emps in the ascending order of annual salary?
Posted by
aswinialuri-19361
on 7/30/2013 | Category:
.NET Framework Interview questions
| Views: 8513 |
Points: 40
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Answer:
Select EmpNo,EName,Sal,Sal/30,12 * Sal annual salary from Emp order by annual salary
you can detect by this query
Asked In:
Many Interviews |
Alert Moderator
Bookmark It
< Previous :
What is the main difference between the Button ser ...
Next > :
write a query the name ends with 'i' usin ...
Comments or Responses
Posted by:
Bandi
on: 8/12/2013 |
Points: 10
Hi Aswini,
You will get error with the above code because of
alias name
which is composed of two words... ( Annual salary)
-- Listed out the different types of answers for the above interview question... The query should be as follows
1) Select EmpNo,EName,Sal, Sal/30,12 * Sal [b][annual salary][/b] from Emp order by [b][annual salary][/b] -- by using brackets
2) Select EmpNo,EName,Sal, Sal/30,12 * Sal [b]"annual salary"[/b] from Emp order by [b]"annual salary"[/b] -- By using double quotes
3) Select EmpNo,EName,Sal, Sal/30,12 * Sal [b]annualSalary[/b] from Emp order by [b]annualSalary[/b] -- without using space between words in the alias column name
4) Select EmpNo, EName, Sal, Sal/30, 12 * Sal [b]annualSalary[/b] from Emp order by [b]5[/b] -- Here 5 is the column position in the SELECT statement
5) Select EmpNo, EName, Sal, Sal/30, 12 * Sal [b]annualSalary[/b] from Emp order by [b]12*Sal[/b] -- By using actual expression
Login to post response
More Interview Questions by aswinialuri-19361
write a query the name ends with 'i' using sql server?
write a query name starts with 's' using sql server?
write a query allow only 4 characters in name column using sql server?
How to allow only alphabets using regular expression validator?
How many generations in Gc within managed heap and what are the defaul ...
what is the max size of rows in a particular table
how to detect the product level,product version and edition in sql ser ...
In.Net which is the parent class to create all windows service?
Latest Interview Questions
How does the lifecycle of Windows services differ from Standard EXE?
In WCF, which binding is used for cross-machine communication or WCF-t ...
Which one is the right way to get the TextBox value with id="txtb ...
What is inheritance hierarchy?
How to call an action Method on the click of a link?
What is the difference between inline code and code behind in asp.net?
Which of the following statement is correct regarding .exe and .dll
Considering @Page Directives which of the following options suits this ...
More ...