"Karmanyevadhikaraste ma phaleshu kadachana, Ma karma phala hetur bhurmatey sangostva akarmani."

interview-qns3

Testng:
Gave me some scenarios and asked to write the testcases . One was " User is bying some policy. He needs to pay some amount is he is renewing  after 2 months . But if he renews before 2 months he doesnot need to pay anything"

@beforeTest, @aftertest @test etc..
How to test private class

What is data provider in testNG
 use reflectionjunitx.util.PrivateAccessor [8], to assist in using the reflection API
SQL:

join queries:
SELECT s.studentname
    , s.studentid
    , s.studentdesc
    , h.hallname
FROM students s
INNER JOIN hallprefs hp
    on s.studentid = hp.studentid
INNER JOIN halls h
    on hp.hallid = h.hallid

Update queries
 UPDATE CUSTOMERS
SET ADDRESS = 'Pune', SALARY = 1000.00;
Some other queries like find Highest salary, find unique records
 select id, name, population
from yourtable
where population in (select max(population)
                     from yourtable)

2nd highest:
SELECT * FROM T1
WHERE SALARY =
        (SELECT MAX(SALARY) FROM T1
           WHERE SALARY <> (SELECT MAX(SALARY) FROM T1)
        );

UNIX:
Unix commands like list all the file names which have some particular text present in them:
$ grep check * -lR