GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Basics
Go To First  |  Previous Question  |  Next Question 
 Basics  |  Question 26 of 49    Print  
write a query that displays the difference between the highest and lowest salaries. Label the column DIFFERENCE.

  
Total Answers and Comments: 2 Last Update: November 07, 2006     Asked by: zecar 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Manikandan
 
select max(sal)-min(sal) as Difference from employee;

Above answer was rated as good by the following members:
XYRUZ24
September 22, 2006 01:21:06   #1  
Manikandan        

RE: write a query that displays the difference between...
select max(sal)-min(sal) as Difference from employee;
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
November 07, 2006 08:29:28   #2  
Neeraj        

RE: write a query that displays the difference between...
You can write the query in the following way.select max(sal)-min(sal) difference from emp;
 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : Primary Key & Unique Key1.))) P_key - A column in a table whose values uniquely identify the rows/tuple/entry of the table. A primary key value cannot be NULL. U_key - A column in a table whose values uniquely identify the rows/tuple/entry of the ...

Latest Answer : null in c is some garbage value which cannot be predicted . If you are not intialising any value to the variable then null value is present in auto variables.null in oracle is used in sql queries for getting values whose values are null such as manger ...
Read Answers (10) | Asked by : Beena

Latest Answer : What's the Difference between COM and DCOM?Obviously, the difference is that DCOM is distributed but COM is not. To be more precise, there are three main elements added to COM: The way for creating a remote object. The way for accessing a remote object. ...
Read Answers (1) | Asked by : satish

Latest Answer : SGA: System Global Area. Its a chuck of memory used on oracle processes. ...
Read Answers (23) | Asked by : Rahul

I hav oracle 9i installed on my server, and I am fireing a query as followsSelect distinct divisioncode from Mdivision Order By DivisionCodeWhen I fire this query in sql plus, it runs and give me results.but when I fire it thru asp script as follows rsDiv.Open sql,conn,3,1 while traversing thru the recordset on line if not rsDiv.EOF thenit is giving me following errorADODB.Recordset (0x800A0E78)Operation is not allowed when the object is closed.Pl. help me a.s.a.p.
Read Answers (2) | Asked by : ashok

Latest Answer : In case of varchar it store upto 2000 bytes and in case of varchar2 it stores 4000 bytes that is the basic difference between varchar and varchar2. ...
Read Answers (21) | Asked by : Srinu

Latest Answer : replace function replaces a sequence of characters in a string with another set of characters.ex.  select replace('123data',123,'X') from dual;REPLA-----Xdatahere 123 replaces by Xtranslate function replaces a sequence of characters in a string with ...
Read Answers (9) | Asked by : Srinu

Latest Answer : rownum is the temp num assigned for the return rows per statement queryIt will change as per the query statement. It can be used with "=1" or "< 10" id number .Where as rowid is the id assigned by the Oracle while creating record in database.  It ...
Read Answers (6) | Asked by : senthil

Create a query that display the last name,hire date and the day of the week on which the employee started. Label the column DAY. Order the results by the day of the week starting with Monday.LAST_NAME HIRE_DATE DAYGrant 24-MAY-99 MONDAYErnst 21-MAY-99 TUESDAYMourgos 16-NOV-99 TUESDAY------- ----- SUNDAY
Read Answers (7) | Asked by : zecar

Latest Answer : SELECT job, count(*) AS no.ofemployee FROM emp GROUP BY job; ...
Read Answers (6) | Asked by : zecar


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

Getting Started with Oracle and ODP.NET

ODP NET Developer&rsquo; s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
 

PHP Oracle Web Development Review

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books The author is also an expert in open source technologies and SOA Service Oriented Architecture But besides
 

jQuery - Column Highlighting

Learning jQuery Column Highlighting It can be a nice user interface enhancement to visually remind the user of what has been done in the past By highlighting the column that was most recently used for sorting we can focus the user s attention on the part of the table that is most likely to be releva
 

Step by Step Oracle PL-SQL Tutorial

This introductory tutorial to PL SQL will help you to understand the basic concepts of PL SQL Please review the following tutorials and practice the sample SQL Statements on your local Oracle Database Please note that you must learn these basic things before we actually start getting in to Advanced
 

Working with XML in Oracle

Working with XML in Oracle Introduction to XML Extensive markup language is the language which presents data in a human readable form of text The data can be anything from a purchase order or a stock quote or weather radar or a flight schedule it can be represented using XML XML is very similar to H
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape