Challlengebrains Blogspot Com IMportant
Challlengebrains Blogspot Com IMportant
Challlengebrains Blogspot Com IMportant
CONTACT ME
A to Z
Sql Querrys
Information
MAY
8 UNDEFINED
Blog Archive
2015 (4)
SQL Queries
1)Display the details of all employees
a)select * from emp;
2014 (15)
2013 (56)
Total Pageviews
2012 (52)
2011 (243)
December (32)
Labels
November (26)
October (7)
Ajax (33)
September (11)
August (14)
July (21)
Followers
June (5)
May (24)
Comparing
DCOM,Remoting
and Web Services
About Me
Information
View my complete profile
Popular Posts
andhrapradesh ssc
2011 results
Triggers -- Sql Server
CREATE TRIGGER
(Transact-SQL)
SQL Server 2005: Get
full information about
transa...
Difference between
Primary Key and
Unique Index
What is the difference
between UNION and
UNIONALL?...
Creating DataView
DataTable Creating,
Adding, Modi...
How To Cross-browser
javascript
IsNumeric()
method...
read asp radio button
list selected value
Show grand total
running total Display
Sql Querrys
SQL Queries 1)Display the
details of all employees
a)select * from emp;
2)Display the depart
informaction from
department table a)sel...
Real Time
Scenario
Based
Interview
Questions
Hai Friends, As we know
that getting more experience
and then going for the
interview requires more
knowledge and if we see, it
requires m...
C# Sort String Array
You need to sort your List or
array of strings using the C#
programming language.
You have a small or
medium number of strings,
converted by W eb2PDFConvert.com
Difference Between
Int32.Parse(),
Convert.ToInt32(...
GridView Fo...
Election Results
a)select ename from emp where hiredate < '30JUN-1990' or hiredate >
'31-DEC-90';
14)Display current Date.
a)select sysdate from dual;
15)Display the list of all users in your
database(use catalog table).
a)select username from all_users;
16)Display the names of all tables from current
user;
a)select tname from tab;
17)Display the name of the current user.
a)show user
A To Z Software Solutions.
Powered by Blogger.
Home
18)Display the names of employees working in
depart number 10 or 20 or
40 or employees working as CLERKS, SALESMAN
or ANALYST.
a) Select ename from emp where deptno
in(10,20,40) or job
in('CLERKS','SALESMAN','ANALYST');
19) Display the names of employees whose name
starts with alphabet S.
a)select ename from emp where ename like 'S%';
20) Display the Employee names for employees
whose name ends with Alphabet S.
a) Select ename from emp where ename like
'%S';
21) Display the names of employees whose
names have second alphabet A in their names.
a) Select ename from EMP where ename like '_A
%';
22) select the names of the employee whose
names is exactly five
Characters in length.
a) select ename from emp where
length(ename)=5;
23) Display the names of the employee who are
not working as MANAGERS.
a) Select ename from emp where job not in
('MANAGER');
24)Display the names of the employee who are
not working as SALESMAN OR CLERK OR
ANALYST.
A)select ename from emp where job not
in('SALESMAN','CLERK','ANALYST');
25) Display all rows from EMP table. The system
should wait after every Screen full of information.
meaning yo...
Add Check Box Inside
DataGrid in C# windows
Application
This article will explain you
how to insert Checkbox
inside DataGridView in
windows application. This
article is for beginners. First
crea...
What is the difference
between Data Grid and Data
Repeater control?
Repeator Control: 1)Readonly; no inherent support for
selection or editing 2)No
inherent look; you lay out the
list by creating temp...
Dynamically Add New Row
in GridView Using Asp.Net
Introduction: I decided to
write this article because
this has been asked so
many times before at the
forums(http://forums.asp.net
) . Basic...
Insert Data in
Dtabase
Using WCF
Services in
ASP.Net
Introduction : Here I will
explain how to use or
consume WCF (windows
communication foundation)
service in web application
using asp.net....
Basic JQuery Interview
Questions For Freshers
If you put jQuery in your CV,
then beware, you should be
able to answer following
questions. Better you read
on, and test yourself how
much...
Read and
Wirite Data
InTo MsWord Using
Asp.Net
In this article i am going to
describe how to read and
write to ms word file or
document in ASP.NET using
FileStream, StreamReader
and Str...
Crystal Report: Formatting
the Decimal Field into
Integer
Even though I am currently
working in SharePoint I still
have a fond of working in
crystal reports. Recently in
the MSDN forums I saw a
re...
Subscribe To
converted by W eb2PDFConvert.com
a) Set pause on
Posts
Comments
Advertisement
employees.
a)select sum(sal) from emp;
28)Display the maximum salary from emp table.
a)select max(sal) from emp;
29)Display the minimum salary from emp table.
a)select min(sal) from emp;
30)Display the average salary from emp table.
a)select avg(sal) from emp;
31)Display the maximum salary being paid to
CLERK.
a)select max(sal) from emp where job='CLERK';
32)Display the maximum salary being paid to
depart number 20.
a)select max(sal) from emp where deptno=20;
33)Display the minimum salary being paid to any
SALESMAN.
a)select min(sal) from emp where
job='SALESMAN';
34)Display the average salary drawn by
MANAGERS.
a)select avg(sal) from emp where
job='MANAGER';
35)Display the total salary drawn by ANALYST
working in depart number
40.
a)select sum(sal) from emp where job='ANALYST'
and deptno=40;
36)Display the names of the employee in order of
salary i.e the name of
the employee earning lowest salary should salary
appear first.
a)select ename from emp order by sal;
37)Display the names of the employee in
descending order of salary.
a)select ename from emp order by sal desc;
38)Display the names of the employee in order of
employee name.
a)select ename from emp order by ename;
39)Display empno,ename,deptno,sal sort the
output first base on name
and within name by deptno and with in deptno by
sal.
a)selectempno,ename,deptno,sal fromemp
order byename,deptno,sal
40)Display the name of the employee along with
their annual salary(sal*
12).The name
of the employee earning highest annual salary
should apper first.
a)select ename,sal*12 from emp order by sal
desc;
converted by W eb2PDFConvert.com
converted by W eb2PDFConvert.com
converted by W eb2PDFConvert.com
converted by W eb2PDFConvert.com
77')from dual
75)Display your age in months.
a)select months_between(sysdate,'10-sep-77')
from dual
76)Display the current date as 15th Augest Friday
Nineteen Ninety
Saven.
a)select to_char(sysdate,'ddth Month day year')
from dual
77)Display the following output for each row from
emp table.
78)scott has joined the company on wednesday
13th August ninten nintey.
a)select ENAME||' HAS JOINED THE COMPANY ON
'||to_char(HIREDATE,'day
ddth Month year') from EMP;
79)Find the date for nearest saturday after
current date.
a)SELECT NEXT_DAY(SYSDATE,'SATURDAY')FROM
DUAL;
80)display current time.
a)select to_char(sysdate,'hh:MM:ss') from dual.
81)Display the date three months Before the
current date.
a)select add_months(sysdate,3) from dual;
82)Display the common jobs from department
number 10 and 20.
a)select job from emp where deptno=10 and job
in(select job from emp
where deptno=20);
83)Display the jobs found in department 10 and
20 Eliminate duplicate
jobs.
a)select distinct(job) from emp where deptno=10
or deptno=20
or
select distinct(job) from emp where deptno
in(10,20);
84)Display the jobs which are unique to
department 10.
a)select distinct(job) from emp where deptno=10
85)Display the details of those who do not have
any person working
under them.
a)select e.ename from emp,emp e where
emp.mgr=e.empno group by e.ename
having count(*)=1;
86)Display the details of those employees who
are in sales department
and grade is 3.
a)
select * from emp where deptno=(select
deptno from dept where
dname='SALES')and
sal between(select losal from salgrade
where grade=3)and
(select hisal from salgrade where
converted by W eb2PDFConvert.com
grade=3);
87)Display those who are not managers and who
are managers any one.
i)display the managers names
a)select distinct(m.ename) from emp e,emp m
where m.empno=e.mgr;
ii)display the who are not managers
a)select ename from emp where ename not
in(select distinct(m.ename)
from emp e,emp m where m.empno=e.mgr);
88)Display those employee whose name contains
not less than 4
characters.
a)select ename from emp where
length(ename)>4;
89)Display those department whose name start
with "S" while the
location name ends with "K".
a)select dname from dept where dname like 'S%'
and loc like '%K';
90)Display those employees whose manager
name is JONES.
a)select p.ename from emp e,emp p where
e.empno=p.mgr and
e.ename='JONES';
91)Display those employees whose salary is more
than 3000 after giving
20% increment.
a)select ename,sal from emp where
(sal+sal*.2)>3000;
92)Display all employees while their dept names;
s)select ename,dname from emp,dept where
emp.deptno=dept.deptno
93)Display ename who are working in sales dept.
a)select ename from emp where deptno=(select
deptno from dept where
dname='SALES');
94)Display employee name,deptname,salary and
comm for those sal in
between 2000 to 5000 while location is chicago.
a)select ename,dname,sal,comm from emp,dept
where sal between 2000 and
5000 and loc='CHICAGO' and
emp.deptno=dept.deptno;
95)Display those employees whose salary greter
than his manager salary.
a)select p.ename from emp e,emp p where
e.empno=p.mgr and p.sal>e.sal
96)Display those employees who are working in
the same dept where his
manager is work.
a)select p.ename from emp e,emp p where
e.empno=p.mgr and
p.deptno=e.deptno;
97)Display those employees who are not working
under any manager.
a)select ename from emp where mgr is null
converted by W eb2PDFConvert.com
converted by W eb2PDFConvert.com
converted by W eb2PDFConvert.com
FROM EMP;
117)Find out last 5(least)earners of the
company.?
a)SELECT DISTINCT SAL FROM EMP E WHERE
5>=(SELECT COUNT(DISTINCT SAL)
FROM EMP A WHERE A.SAL<=E.SAL)ORDER BY
SAL DESC;
118)Find out the number of employees whose
salary is greater than their manager salary?
a)SELECT E.ENAME FROM EMP ,EMP E WHERE
EMP.EMPNO=E.MGR AND
EMP.SAL<E.SAL;
119)Display those manager who are not working
under president but they are working under any
other manager?
a)
120)Display those department where no
employee working?
a)select dname from emp,dept where
emp.deptno not in(emp.deptno)
121)delete those records from emp table whose
deptno not available in dept table.
a)
122)Display those enames whose salary is out of
the grade available in salgrade table.
a)
123)Display employee name,sal,comm and whose
net pay is greater than
any other in the company?
a)
124)Display name of those employee who are
going to retrie 31-DEC-99.
if the maximum job period is 30 years?
a)
125)Display those employee whose salary is ODD
value?
a)select * from emp where sal<0;
126)Display those employee whose salary
contains alleast 3 digits?
a)select * from emp where length(sal)>=3;
127)Display those employee who joined in the
company in the month of
Dec?
a)select ename from emp where
to_char(hiredate,'MON')='DEC';
128)Display those employees whose name
contains "A"?
a)select ename from emp where
instr(ename,'A')>0;
or
select ename from emp where ename like('%A
%');
129)Display those employee whose deptno is
available in salary?
converted by W eb2PDFConvert.com
converted by W eb2PDFConvert.com
converted by W eb2PDFConvert.com
salary?
a)
154)Print the details of all the employees who are
Sub-ordinate to
BLAKE?
a)select emp.ename from emp, emp e where
emp.mgr=e.empno and
e.ename='BLAKE';
155)Display those who are working as manager
using CO-relate sub-query?
a)
156)Display those employee whose manager
name is jones and also with his manager name?
a)
157)Define variable representing the expression
used to calculate on
employee total Annual Remunatation?
a)
158)Use the variable in a statement which finds
all employees who can earn $30,000 a year or
more?
a)
159)Find out how many managers are there with
out listing them?
a)
160)Find out the average salary and average total
remuneration for each job type remember sales
man earn commission?
a)
161)Check whether all employees number are
indeed unique?
a)
162)List out the lowest paid employees working
for each manager exclude any groups where
minimum salary is less than Rs.1000 Sort the
output by salary?
a)
163)List ename,job,annual sal,deptno,dname and
grade who earn $36,000 a year or who are not
Clerks?
a)
164)Find out the job that was failedin the first half
of 1983 and same
job that was failed during the same period on
1984?
a)
165)Find out the employees who joined the
company before their manager?
a)
166)List out all the employees by name and
number along with their
manager's name and number also display %NG
who has no manager?
a)
167)Find out the employee who earned the
converted by W eb2PDFConvert.com
converted by W eb2PDFConvert.com
converted by W eb2PDFConvert.com
converted by W eb2PDFConvert.com
a)
alter table emp add primary
key(empno);
201.
Now increase the length of ename
column to 30 characters.
a)
alter table emp modify(ename
varchar2(30));
202.
Add salary column to emp table.
alter table emp add(sal number(10));
203.
I want to give a validation saying that
salary cannot be greater
10,000(note give a name to this constraint)
a)
alter table emp add constraint chk_001
check(sal<=10000)
204.
For the time being I have decided that I
will not impose this
validation.
My boss has agreed to pay more than
10,000.
a)
again alter the table or drop constraint
with
alter table emp drop constraint
chk_001 (or)Disable the constraint by
using
a)
119)How many different courses are mentioned in
the studies table.
a)
120)Display the names of the programmers
whose names contain 2
concurrence of the.
a)
121)Display the names of programmers whose
names contaion upto 5
characters.
a)
122)How many female programmers knowing
cobol have more than 2 years
experience.
a)
123)What is the length of the shortest name in
programmer table.
a)
124)What is the average development cost of a
package developed in
cobol.
a)
125)Display the name,sex,dob(dd/mm/yy
converted by W eb2PDFConvert.com
31 comments:
mahetar irfan said...
find out all employees name and salary who is working in SMITH department as manager
31 August 2015 at 10:34
Unknown said...
SELECT ENAME,SAL FROM EMP WHERE ENAME='SMITH' AND JOB='MANAGER';
9 September 2015 at 01:05
Sp Raju said...
SELECT ENAME,SAL FROM EMP WHERE ENAME='SMITH' AND JOB='MANAGER';
9 September 2015 at 01:10
Unknown said...
converted by W eb2PDFConvert.com
SANDEEP said...
This comment has been removed by the author.
29 March 2016 at 21:46
SANDEEP said...
converted by W eb2PDFConvert.com
Unknown said...
write a sql query to find out employee name and location who is getting 1000<salary<3000 &
working as clerk, salesman or manager in sales dept.
19 July 2016 at 00:53
Unknown said...
extract names of all employees who's name contain letter 'A' more than once.
25 July 2016 at 09:02
converted by W eb2PDFConvert.com
M Rakesh said...
display employee names from tablename where employee name is exactly 4 characters
8 August 2016 at 11:29
Innovative said...
Display the common jobs from department number 10 and 20.
20 September 2016 at 08:28
Innovative said...
Plz help me to solve the above query
20 September 2016 at 08:29
Post a Comment
Publish
Preview
converted by W eb2PDFConvert.com
Newer Post
Home
Older Post
converted by W eb2PDFConvert.com