Sunday 12 October 2014

Sql interview questions with answers

(1)    How do I list all of my tables?
Ans: SQL> select * from cat;
(2)    Create one table from another table without copying the data from the first table.?
Ans: SQL> create table dept_info( dept_id number(10),
  2  dept_name varchar(25),
  3  constraint pk_dept_id primary key(dept_id)
  4  );
SQL> insert into dept_info values(1,'Account');
SQL> insert into dept_info values(2,'HR');
SQL> insert into dept_info values(3,'Payroll');
.SQL> select * from dept_info;
 
(3)    How do I select from different user’s tables?
(4)    What is SQL?
Ans:Sql is Structured query language:
Query:We ask question to get response
Database understands only QUERYS and RDBMS is widely used in system n/w.
According to ANSI (American National Standards Institute), it is the standard language for relational database management systems.
(5)    What is a function in oracle?
Ans:Function is a subprogram that returns a single value.we must declare and define before we invoke it
Functions are very powerfull feature of sql & can be used to (i) perform calculation on data and modifying individual data items.
Types of Functions:
(i)SINGLE ROW FUNCTION
(ii)MULTIPLE ROW FUNCTION
(iii)Nesting functions
(iv)numeric functions
(v)character or text functions
(vi)conversion functions
(vii)date functions

(6)    What is the default format of date in Oracle? How can I change my default date format?
Ans:The default date format is DD-MON-YY
SQL>select sysdate,systimestamp;
(7)
       1)Rollback:
         ROLLBACK command execute at the end of current transaction and undo/undone any changes made since the begin transaction.
       Sql>rollback;
       2)Savepoint:
         SAVEPOINT command save the current point with the unique name in the processing of a transaction.
Sql>savepoint a;
3) COMMIT:
ANS: COMMIT command to make changes permanent save to a database during the current transaction.
4) Truncate:
Ans:Removes all rows from a table and rleases the storage space used by tat table.
Sql>droptable emp1;
5) Delete:
Ans: The DELETE statement is used to delete rows in a table.
Sql>delete emp1;
6) Drop:
Ans:All data and structure in the table is deleted and any pending transaction are commited and all indexs are droped
      You can’t rollback the drop table.
Sql>drop column commit;
7) PK:Primary key
Ans:It represents (or) identify each row uniquely in a table,
      Only empno is considered as primary key.
      Pk=unique+notnull
      Ck=eligible to become pk
      Ak=ck-pk
8) ROUND:
Ans:Rounds value to specified decimal
      Round(45.926)à46
9)TRUNC:
Ans:Truncates value to specified decimal
      Trunc(45.926)à45
10) Alternate Key:
ANs:Eligible to become to pk but not chosen as pk.
      AK=CK-PK
11) Candidate Key:
Ans:It is a relational model of data base and it is eligible to become PK.
12)Composite key:
Ans: A composite key, in the context of relational databases,
It is a combination of two or more columns in a table that can be used to uniquely identify each row in the table

13)Triggers:
Ans:Triggers provide a way of executing PL/SQL code on the occurrence of specific database
      It invokes many events in table like INSERT,UPDATE,DELETE operations.
14) Equi-Join:
Ans:If we are using “=” operator in join condition is called equijoin.
      Ex:emp.d ptno=dept.deptno
15)OUTER-JOIN:
Ans:It displays both matched and non matching
      (i)full outer,left outer,Right outer.
16) What is a view? What are its advantages?
Ans: the ability to see something or to be seen from a particular place.
        Advantages of views::
         View the data without storing the data into the object.
        2. Restict the view of a table i.e. can hide some of columns in the tables.
        Disadvatages:
        1. Can not use DML operations on this.
        2. When table is dropped view becomes inactive.. it depends on the table objects.

17) What is a synonym?
Ans: synonym are alternate name for tables to view other object in database
Ex:create synonym anyname for scott.emp.
18) What is PL/SQL?
Ans:Procedural language /Structured Query Language.
      It works only on oracle RDBMS
      It is the procedural execution to sql with design features of programming language.
      Data manipulation and Query statements of sql
18) What is an Index? Why it is useful?
Ans: The CREATE INDEX statement is used to create indexes in tables.
Indexes allow the database application to find data fast; without reading the whole table.
19) Mention some features of Oracle 9i database.?
Ans:Varchar 2000bytes
      Varchar2-4000bytes
      No recyclebin
20) Mention some features of Oracle 10g database.
Ans:varchar&varchar2}à4000bytes
      Recylebin is possible.
21) What is the meaning of “i” and “g” in 9i & 10g respectively?
Ans: i means Internet support
        g means Grid technology
22) What is the purpose of joining the tables? Explain different types of Joins.
Ans: An SQL JOIN clause is used to combine rows from two or more tables, based on a common field between them.
      The most common type of join is: SQL INNER JOIN (simple join). An SQL INNER JOIN return all rows from multiple tables where the join condition is met.
Types of joins:
Inner join
Outerjoin
Equi join
Non-equijoin
Self join
23) What are the data types available in Oracle
Ans:Character data type
      Numeric datatype
      Date dattype
      Lob dattype



SQL Interview questions ,Queries, with answers

1)Display all rows and all columns of emp table?
Ans:Select * from emp;
2) Display any 2 columns of emp table?
Ans:Select ename,deptno from emp;
3) Calculate annual salary with Quarterly commission of 500
Ans:select  sal *12=4*500 fom emp;
4)   Display distinct salaries of all the employees
Ans:select distsal from emp;
5) Display output as following,
      "Hello SMITH your salary is 5000"
Ans:select “hello” || ename || your salary is || 5000 from emp;
6) Display all the employees whose name starts with 'S'
Ans:select * from emp where ename like “S%”;
7) List the employees name having letter 'L' as the second character?
Ans:select * from emp where ename like “-L%”;
8) List the employees name having 'E' as last but one character?
Ans:select * from emp where  ename like “%E-“;
9) List the employees name having exactly 4 letters?
Ans:select * from emp where ename like “----“;
10) List the employee whose name is having letter 'L'?
Ans:select * from emp where ename like “%L%”;
11) List the employees name having atleast 5 characters?
Ans:select * from emp where length(ename)=5;
12) List employees earning between 2000 and 3000
Ans:select * from emp where sal between 2000 and 3000;
13) List emp who do not have any reporting manager or commision is Null?
Ans:select * from emp where comm Is null;
14) List emp who do not have any reporting manager AND commision is Null?
Ans:Select * from emp where comm is null and mgr is null;
15) List only managers ?
Ans: select * from emp where job='MANAGER';
16) List managers working in dept 10 and 20?
ANS: select * from emp where deptno in (10,20) and job ='MANAGER';
17) List all the clerks and analysts with salary atleast 1000 in dept 20 and 30
Ans: select * from emp where deptno in (20,30) and sal >=1000 and job in ('CLERKS','ANALYST');
18) List the employees in dept 20 and 30 who get no commission?
Ans: select * from emp where deptno in (20,30) and comm is null;
19) List employees whose name starts with either 'A' or 'S' in dept 20?
Ans: select * from emp where ename like 'A%' or ename like 'S%';
20) List all the employee whoes name does not end with 'S' in dept 20 and 30?
Ans: select * from emp where deptno in (20,30) and ename not like '%S';
21) List the employees who are getting some commision with sal > 1500 in dept 30?
Ans:select*  from emp where deptno in (20,30) and comm>0 and sal>1500;
22) List emp working as managers and clerks with Salary atleast 2000 except in dept 10 and 20?
Ans:select * from emp where  deptno in (20,30) and job in ('MANAGER','CLERKS') and sal>=2000;
23) List emp who get commission?
Ans: select * from emp where comm is not NULL;
24)  List employees in all dept whose salary not in the range of 2000 to 3000 with the job which is having a string called 'MAN'
Ans: select * from emp where job like 'MAN' and sal not between 2000 and 3000;
25)  List employees whose name having 4 characters
Ans: select * from emp where length(ename)=4;
26) List employees whose job is having 7 characters?
Ans: select * from emp where length(job)=7;
27) Find out howmany times letter 'S' occurs in 'qspiders'?
Ans:
28) List the employees whose job is having last 3 characters as 'man'?
Ans: select * from emp where job like'%MAN';
29) List employees whose job is having first 3 characters as 'man'?
Ans: select * from emp where job like'MAN%';
30) Display all the names whose name is having exactly 1 'L'?
Ans: select * from emp where ename like'%L%';
31) Display dept names which are having letter 'O'?
Ans: select ename,dname from emp,dept where dname like '%O%';
32) Display the output as shown below,
   Scott working as a clerk earns 3000 in dept 20?
Ans:
33) Display employees who earn odd numbered salaries?
Ans: select ename,sal,sal/2 from emp where sal/2 like'%%';
34) Display number of employees getting NULL comission.?
Ans: select * from emp where comm is null;
35) Display total sal and comm drawn by dept 30?
Ans:
36) Count number of clerks in dept 10 and 20?
Ans: select count(*) from emp where deptno in (10,20) and job='CLERKS';
37) List Department wise total salary?
Ans: SQL> select ename,sal,deptno,sal*12 from emp order by deptno;
38) List department wise total sal only if the total sal is > 3000?
Ans: selct ename,sal,deptno,sal*12 from emp where sal*12>3000;
39) Display job wise total salary excluding dept 30 only if the total salary is > 5000?
Ans: select ename,sal,deptno,sal*12 from emp where deptno <>30 and sal*12>5000 order by job;
40) Display job wise max sal only for managers, clerks, salesman working in dept 10 and 20. Sort the data by des order of the max salary?
Ans:
41) Display job wise number of employees in all the department with total salary > 9000?
Ans: select count(ename),count(sal),count(sal*12),count(deptno) from emp where sal*12>9000;
42)  Display the department number having atleast 4 employees in it?
Ans: select * from emp where deptno in(20,30);
43) Display the department having only saleman in it?
Ans: select * from emp where job ='SALESMAN' and deptno in(10,20,30);
44) Calculate number of L in string 'HELLLLL'?
Ans: select instr('HELLLL','L','1','2')
45) Display all the employees whose job has a string 'MAN'?
Ans: select * from emp where instr(job,'MAN')>=1;
46) Display all the employees whose job starts with string 'MAN'?
Ans: select * from emp where instr(job,'MAN')=1;
47) Display all the employees whose job ends with string 'MAN'?
Ans: select * from emp where instr(job,'MAN')>1;
48) Display first 3 characters of ename in lower case and rest everything in upper case.?
Ans: select ename,concat(lower(substr(ename,1,3)),upper(substr(ename,4))) from emp;
49) Display the result from emp table as below. SMITH is a CLERK and gets salary 2000 ?
Ans: SQL> SELECT Concat(Concat(Concat(Concat(Concat(Concat(Concat(ename,' working as a '), job),' earns '), sal),'  in '),'dept '), deptno) AS text FROM emp;





Thursday 9 October 2014

Sample Selenium interview questions

Explain in paper Project in detail
Daily work in your Organization
Whats the process u followed?
Explain Test life cycle
what are the common compatibility bugs found?
we are entering some text in the edit box but it disappears & invisible what might be the reason?
Did you take any training?
whats your daily routine?
Explain the responsibility that you have mentioned in your CV
what was the need of Testing
Whats your contribution to improve the Quality.
What made you to shift from development to testing?

Real time Selenium technical questions


01: Tell me about yourself
02: When you will not be automating an test case?
03: simple sql query to fetch data from two table
04: Question were realted to my project
05: puzzle.
1. Can you write a dynamic xpath
2. What frame work is used in your project
3. Can you write a build.Xml
4. Write a query for self join
5. A flex board is produced from factory how do you test that
6. Write a code where there are 2 set's of key value pair, print the value only if keys and values are same
7. Have you worked on Unix
8. What are the advantages of pom frame work in selenium
9. As a qa engineer do you think known the backend process is important
10. What is non functional testing
1.what is the meaning of this line
WebDriver driver=new FirefoxDriver();

2.login on facebook and description of each method

3.can we other function behalf of get().

4.how do you log the defact in manual testing.

5.Defect life cycle.

6.there is 2 textbox id password.something is already written in text field like "Emailid",how can you copy from emailid field and paste in password field.

7.about yourself.

8.project description.

9.About my current company enviroment.

10.puzzle:-3 bulb and 3 switches problem.

11.How to handle the drop downlist.

12.overloading and overridding

13.
it's a overloading or overridding will it compile or not.
public int m1(int a,int b)
public float m1(int c,int d)

14.we have a excel sheet some thing is written in excel sheet then compare those value with web page values.

15.how many bugs have you found yet.tell me 2 complex bug.

16.string reverse .

17. find higdest value in list.

18.find the duplicate value in list.

19.how will upload a file if the text is not editiable.

Wednesday 8 October 2014

100+ manual interview questions 2+ experience


1)Can you explain the project?
Ans:
2)Who sets the severity and priority in your project?
Ans:
3)Can u explain defects raised in your project?
Ans:
4)severity and priority?
Ans:
5)Project related questions?
a)in my project
b)as we do getting
c)we have written tcs to ensure that the good coverage to catch the maximum number of defects.
Ans:
6)What is sdlc,Types of models?
Ans:
7)Which model do you use in ur project?
Ans:
8)Can u explain v-model & Agile?
Ans:
9)why did you follow this model in your project?
Ans:
10)What is s/w testing & why should we do s/w testing?
Ans:
11)Diff types of s/w testing
Ans:
12)different levels of s/w testing-FT,IT,ST,SMOKE TESTING & ADHOC TESTING
Ans:
13)What is WBT,types of WBT & who do the WBT?
Ans:
14)Adv & Disadv of SDLC?
Ans:
15)How did they do WBT in your current project?
Ans:
16)What is BBT,different types & diff b/w WBT & BBT?
Ans:
17)What is FT,can u explain me how you have done ft in your project?
Ans:
18)What Is IT,Why should we do IT anddifferent types of IT?
Ans:
19)When one model is build and other model is not build,how do you do IT?
Ans:
20)Stubs and drivers?
Ans:
21)In your current project how you do IT?
Ans:
22)What is System testing?
Ans:
23)Diff b/w System testing & E2E testing?
Ans:
24)How you have done system testing in your project?
Ans:
25)Who is involved in installation of build in your current project
Ans:
26)What is smoke testing and when do we do smoke testing?
Ans:
27)Why does TE wants to do smoke testing?
Ans:
28)Diff b/w smoke & sanity?
Ans:
29)How you have done smoke testing in your current project?
Ans:
30)What is Adhoc testing and why should we do Adhoc testing?
Ans:
31)Why does Te wants to do adhoc testing?
Ans:
32)At which stage we do Adhoc testing?
Ans:
33)How you have done Adhoc testing in your project?
Ans:
34)What is compatibility Testing?
Ans:
35)What are the defects identified during compatibility Testing?
Ans:
36)On which platform have you done compatibility testing?
Ans:
37)Who decides compatibility Testing?
Ans:
38)What is exploratory testing?
Ans:
39)When we do exploratory testing?
Ans:
40)When we do exploratory testing & drawbacks?
Ans:
41)How to overcome the drawbacks of exploratory testing?
Ans:
42)What is Regression Testing?
Ans:
43)What is usability testing?
Ans:
44)For what kind of application we do usability testing?
Ans:
45)What is Regression Testing ,Types and how do you identify the impact areas in your project?
Ans:
46)When and why we go for full Regression Testing?
Ans:
47)Diff b/w Regression Testing & Re testing?
Ans:
48)SDLC Vs STLC?
Ans:
49)What,Why we do and When we do Retrospect meeting?
Ans:
50)Who are the people involved in retrospect meeting?
Ans:
51)What are the test execution report consists of?
Ans:
52)Who prepare test execution report?
Ans:
53)What is STLC?
Ans:
54)What is RTM,Advantages,Who writes RTm and When they are going to write RTm?
Ans:
55)Explain RTM That followed in current project?
Ans:
56)Advantages of test paln?
Ans:
57)How do you decide which feature to be tested and which feature not be tested?
Ans:
58)When to stop testing?
Ans:
59)What are Tcs,Who writes Tcs,When they write Tcs,why do we write tcs?
Ans:
60)Explain the review that was followed in current project?
Ans:
61)Who review and how do you review Tcs?
Ans:
62)What are test case design Techniques?
Ans:
63)Can you explain the integration defects that was raised in your project during testing?
Ans:
64)Diff b/w testing & Quality?
Ans:
65)Why does the s/w to be tested?
Ans:
66)Good attributes of TE?
Ans:
67)if cant deliver 100% of free defects whats the use of testing?
Ans:
68)What are the challenges of test engineer?
Ans:
69)Can we conduct System testing directly by avoiding Component testing & Integration testing?
Ans:
70)What is acceptance testing?
Ans:
71)Diff types of test plan?
Ans:
72)After you receive the build what is the next stage you will do?
Ans:
73)If the smoketesting is failed how do you report the defects?
Ans:
74)Who identifies regression test cases?
Ans:
75)Diff b/w test case design(Ep,BVA and EG) & Testing Types(BBT and WBT)?
Ans:
76)What is review and explain review process thatyou followed in your project?
Ans:
77)Diff b/w Static & Dynamic testing?
Ans:
78)What is code review and How will you receive project requirement?
Ans:
79)Is the testing team involved in SRS Preparation?
Ans:
80)What are the sections to be present in SRS?
Ans:
81)After the understand of requirement what you will do?
Ans:
82)Should You understand whole project functionality?
Ans:
83)User story)
Ans:
84)Important of test plan?
Ans:
85)Explain the various testing conducted in your project?
Ans:
86)Explain WBT?
Ans:
87)What is BVA,Ep and EG?
Ans:
88)What are the field present in Tcs?
Ans:
89)What sre test Scenarios?
Ans:
90)What is the most difficult part of tets design?
Ans:
91)How doyou test ATM,Traffic signal,Elevator,pen and mobile?
Ans:
92)After writing the test cases what is the next step?
Ans:
93)I want to design tcs for the new domain which you have not worked before?
Ans:
94)How do you handle Tcs?
Ans:
95)Explian the scenario where you have not able to write tcs for given requirment?
Ans:
96)What % of positive and negative test cases that  write in project?
Ans:
97)How frequently the build is released for the testing?
 Ans: we get the builds once in a week or by weekly I.e.,15days
98)How you come to know build is ready for testing?
Ans:
99)What do you do when TC fail?
Ans:
100)Whom do you report when you find a defect?
Ans:
101)What do you report/What information do you report with the bugs?
Ans:
102)Explain hot technical dicussion you had in your project?
Ans:
103)How do handle aggressive developers?
Ans:
104)You are going to reopen the defect fixed by developer.How do you handle the situation?
Ans:
105)How do you handle the developer who is not aggressive the defect you are reported?
Ans:
106)Explain diff b/w severity & priority?
Ans:
107)Who decide when to stop testing?
Ans:Test lead and manager.
108)What is impact analysis?
Ans:
109)What if you dnt find solution for critical bug?Do you stop testing?
Ans:
110)Can you explain the situation that you faced in during testing?
Ans:
111)Diff b/w testing & Debugging?
Ans:
112)Who allocates the work in your project?
Ans:
113)How do you report to your manager on daily basis?
Ans:
114)Is money important /work is important
Ans:Work is important and money is more important