ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 


 

Company >> Cognizant >> Cognizant Questions
 
 Accenture technical test questions  Accenture Technical Test Questions (3)  Cognizent aptitude test questions  Cognizent Aptitute Test Questions (4)  Intel interview questions  Intel Interview Questions (66)
 
Back to Questions Page
Question   If there are five steps in a JCL i have to execute the 3rd step, bypass the 4th step and execute the 5th step how do i do this? Rank Answer Posted By  
 Interview Question Submitted By :: Kavitha
I also faced this Question!!   © ALL Interview .com
Answer
//jobname positional parms,keyword parms,.... Restart=step3
//..
//..
//..
//step3 exec=xxxx 
//...
//step4 exec=yyyy,cond=(0,eq,step3)
//..
//step5 exec=zzzz
 
4 Joshna
 
 
Answer
You can Use RESTART in job cards.
RESTART=JOBSTEPNAME.PROCSTEPNAME
Thanks

 
1 Syntel
 
 
Answer
Sorry,my previous solution was wrong.Infact it is correct 
if you don't want to skip step 4th step

The correct solution for this is
to use COND paramater. 
 
0 Syntel
 
 
 
Answer
The below given code provides the exact solution,

//STEP001 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=XXX.GENERAL.STUDY(TEST001),DISP=SHR
//SYSUT2   DD SYSOUT=(A,INTRDR)
//SYSIN    DD  *
 EDIT TYPE=EXCLUDE,STEPNAME=(STEP003,STEP005)
/*
 
0 Pradeep
 
 
Answer
This jcl is the correct answer, this is used to run a batch 
job in production environment.
*** if the JCL will run step3 and step5 condcode is 0
     while step4 condcode is flush means it will not run.

//jobname  jobcardxx
//         xxxxx
//         xxxxx
//         xxxxx
//..
//..
//step3 exec pgm=xxx,cond=(4,lt)
//....
//....
//step4 exec pgm=xxx,cond=(0,le)
//....
//....
//step5 exec pgm=xxx,cond=(4,lt)
//....
//....


RUDOLF M. AQUINO
SYSTEM PROGRAMMER(MAINFRAME)
UNITED COCONUT PLANTERS BANK
MAKATI CITY
 
5 Rudolf
 
 
Answer
//jobname positional parms,keyword parms,.... Restart=step3
//..
//..
//..
//step3 exec=xxxx 
//...
//step4 exec=yyyy,cond=(0,Le,step3)
//..
//step5 exec=zzzz

Restart =step 3 executes step3.Step 3 gives some return 
code.In step 4,the test is passed as 0 is less than step 
3.So step 4 is bypassed and is not executed. and the 
program is responsible for issuing the return code that
was not even loaded in the main storage. 
The result: no return code can exist 
In the steps that follow any test of COND parameter tat 
attempts to interrogate this non-existent return
code will be ignored . Step 5 will be e executed.
 
0 Sreelatha
 
 
Answer
//STEP001 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=XXX.GENERAL.STUDY(TEST001),DISP=SHR
//SYSUT2   DD SYSOUT=(A,INTRDR)
//SYSIN    DD  *
 EDIT TYPE=EXCLUDE,STEPNAME=(STEP003,STEP005)
/*
 
4 Raj
 
 
Answer
1)Give restart=step03 in job card
2)in step04 give cond=(0,le)
3)step05 no condition neeeded

sample jcl is given below



//AAUT001D JOB ,'TEST',MSGLEVEL=(1,1),CLASS=C,MSGCLASS=H,   
//             NOTIFY=&SYSUID,RESTART=STEP003               

//STEP001 EXEC PGM=AUT0EMP                               
//EMPLOY1 DD DSN=PROGMR.SBPD.EMP.DATA.SAMPLE1,DISP=SHR   
//SYSPRINT DD SYSOUT=*                                   
//SYSOUT DD SYSOUT=*                                     

//STEP002 EXEC 
PGM=AUT0EMP                                       
//EMPLOY1 DD 
DSN=PROGMR.SBPD.EMP.DATA.SAMPLE1,DISP=SHR           
//SYSPRINT DD 
SYSOUT=*                                           
//SYSOUT DD 
SYSOUT=*                                             

//STEP003 EXEC PGM=AUT0EMP                                 
//EMPLOY1 DD DSN=PROGMR.SBPD.EMP.DATA.SAMPLE1,DISP=SHR     
//SYSPRINT DD SYSOUT=*                                     
//SYSOUT DD SYSOUT=*                                       

//STEP004 EXEC PGM=AUT0EMP,COND=
(0,LE)                       
//EMPLOY1 DD 
DSN=PROGMR.SBPD.EMP.DATA.SAMPLE1,DISP=SHR       
//SYSPRINT DD 
SYSOUT=*                                       
//SYSOUT DD 
SYSOUT=*                                         

//STEP005 EXEC PGM=AUT0EMP                                
//EMPLOY1 DD DSN=PROGMR.SBPD.EMP.DATA.SAMPLE1,DISP=SHR    
//SYSPRINT DD SYSOUT=*                                    
//SYSOUT DD SYSOUT=*
 
0 Sivakumar Sekharannair
 
 
Answer
It depends on the situation. I recommend against using
IEBEDIT to alter the JCL. Use of IF ... THEN is more
perspicuous than use of the COND parm.
 
0 Name
 
 
Answer
//jobname  jobcardxx
//         xxxxx
//         xxxxx
//         xxxxx
//..
//..
//step3 exec pgm=xxx,cond=(0,gt)
//....
//....
//step4 exec pgm=xxx,cond=(0,le)
//....
//....
//step5 exec pgm=xxx,cond=(0,gt)
//....
//....
 
0 Rahul Singh
 
 
Answer
If A PROC HAS steps, which are like step2,step3,step4,step5 
and i want to execute only step3 then how do we need to 
code jcl using IEBEDIT.
 
0 Santhosh G.j.
 
 
Answer
We use the COND Parameter for By pass the 5th step &
RESTART=Step Name in the job Card.
// Jobname Job Acc.info,Programmer
name,..............,Restart=Step3
//Step4 EXEC PGM=Program Name,COND=(0,LE,Step3)
//Step5 EXEC PGM=Program Name
//
 
0 Rajesh
 
 
Answer
Hi,
I recommend the following steps:
1)Restart=step3  in the job card
2)cond=even  in 4th step,what will happen it will bypass 
this step even if 3rd step abends.
 
0 Samay Simant
 
 
Question   what is keyword driven framework in qtp. Rank Answer Posted By  
 Interview Question Submitted By :: Yrkvarma
I also faced this Question!!   © ALL Interview .com
Answer
keyword Driven Frame work means:
Frame work means it is the approach for scripting.
 In keyword Driven Framework, it contains different folders 
like Libraries, Datafiles, Driver , Controller , Recovery 
Scenario Manager, object Repositories, and Results file.

Driver:it gives the way to the controller,
Controller: it contains the path of rest of the folders.

 this way keyword driven Framework Works.

pls correct me, if im wrong.
 
5 Kavitha
 
 
Answer
keyword driven Framework 

After Recording Script keyword View contain each step and 
display the object hierarchy, in amodular , icon based 
table.

if m wrong mail me at 
Rohit Sharma
er.s.rohit@gmail.com
 
0 Rohit Sharma
 
 
Answer
Hi Kavita,

I think your ans. is not specific with Keyword Driven Frame 
work. Your answer is about common flow of Frame work.


for more Clearity mail me 

yogesh_dgn@yahoo.com
or
09959511164
 
0 Yogesh
 
 
Answer
Keyword Driven Framework :

It is nothing but keyword driven test or keyword view, used 
for parametarization.

It is dividing into 4 parts.

1. item     2. operation     3. value      4. 
documentation     ----> in QTP 8.2

In QTP 6.5 keyword view is nothing but Tree View. It 
displays the list of objects along with logical names.
 
0 Yogesh
 
 
Answer
Keyword-driven tests look very similar to manual test 
cases. In a keyword-driven test, the functionality of the 
application-under-test is documented in a table as well as 
in step-by-step instructions for each test. In this method, 
the entire process is data-driven, including functionality.
 
0 Kiran
 
 
Answer
As the name suggest, it enables keyword driven testing.
Data and Keyword are independent of tool.
Enables documentation of functionality of AUT in a tabular 
format.
 
0 Ajay Shembekar
 
 
Answer
Framework: It is a procedure how we execute our scripts and 
finally how we view the results, like how we create the 
test scripts, functions libraries, repository files and 
finally how we send the results to our lead or manager or 
to the client.

"Keyword Driven Framework" consists of a folder structure.
Test Scripts are saved in "Test Scripts" folder
vbs files in "Library" folder
"Docs" Floder - Documentation for all the functions like
(Function Library, Function Name, Arguments, Description, 
Author, Object Repository used)
Object Repository Files in "Object Repository" folder
"Reports", "Data" etc

Finally, we convert the "Results" in HTML format(Test 
Results Window, File-->Export to HTML File
 
0 Prashanth
 
 
Answer
Hi,
Frame Work is the model or structure we follow for a
Project. It is the approach that we follow to automate the
Project. There are so many types of framework in QTP.

1. Datadriven frame work
2. Keyword driven frame work
3. Module driven framework
4. Hybrid driven frame work

The framework you choose, depends on the model of your
Project. Usually most of projects fall under hybrid driven
frame work.

Datadriven framework: Here we divide the entire project in
to modules and start automation by writing data driven
scripting for each one of them. We will have test data
either in excel sheet or flat files or from database...we
will pass that test data in to the script and perform data
driven testing.
Keyword driven framework:
Firstly we should add the objects to repository( Shared
repository is preferable)
Then we can generate/write scripts for each functionality
and save them as the library files ( .vbs files)
Then we have to associate all these library files(which are
generated to test different funtionalities) to Quick Test.

Module driven frame work: we will divide entire project in
to modules and write functions or procedures for each and
every module and automate the project.
Hybrid driven framework: it is combination of Datadriven
and module driven framework.

If you want more information about keyword driven framework
ask me thorugh our forums.


Thanks,
Sandip Gami
 
0 Sandipgami84
 
 
Answer
hi this is nagesh
framework: It is generic work prepared by group of experts followed test engineers to preform a specific task in an efficient, effective and optimized way.

keyword driven framework:
        first we will preparing folder structure(env, lib, test data, repository, recovery, test script file).
and first we will manually prepare 
env file: (by default qtp will create env file. env file extension .XML, (QTP>file settings>env>click>user define>EX-name:nages, value:path of the application>save>.xml)and export this env file in env file)
library file: first u will take notpad and u will prepare lib file lib file extension is .VBS
Test data: u will prepare test data
Test script: and u will genarating the basic script and u will split it and u will set reusabul and saved it)
recovery secnario: u will prapare recovery secnario
if possible u will prpare rgular expressions file
and
u will take new page
and u will set in datatable some name like keys in that column u will prepare some variables ex:k1, k2. k3
after u will write in expert view
varibule name=datatabl("keys")
and u  will create select case andu will
associate lib file, ev file, recovery file,and
u will create case function and run
 
0 Nageh
 
 
Answer
A framework is used for maintanance of test cases, recorded
scripts & actions, test data and test results in a central
repository or in form of folder structure. Framework saves
recorded scripts or scripts in expert view (by enhancing the
tests using custom checkpoints, regular expression)etc. and
make them resusable and generic which can be used again and
results can be compared by passing different set of data.

There are following types of framework:

1. Modular Framework
2. Keyword framework
3. Data Driven framework 
4. Hybrid Framework

Modular Framework:- it is functional decomposition of
application modules. (business components). 

Keyword Framework:- 

It is table driven Framework which stores the object
parameters property and their values. It is used when a
Business function script runs and loads the test case,
corresponsing row in table is read and corresponding
function is called using the keyword from the table. The
business function script passes the parameter value (input
parameter) through either test data.xls or data table at run
session and returns the results in form of output parameters
to the test results folder or data table.This is called data
driven approach where scripts are parameterised through a
set of input and output values.


Hybrid Framework:- It is the highest level of framework
which encapsulates all approaches. It has various components:

Input Script for launching the qtp
i)Set reporting framework
ii)Set working area
iii)Set folder structures by reading the value of xml files
and setting them as global variable.
and other activities like giving control to controller script.

Main script for loading the list of test cases by reading
example a database file with ordering of test cases,
executes the test cases in either datatable by accessing
datatable methods.

Output script for sending test results to test results folder.
 
0 Sharad Garg
 
 
Answer
Framework : Framework is a defined process for re usability
of resources like libraries, object repositories, testcases,
e.t.c. And features(test plan,Re-usable test cases,
different format reports, e.t.c)  that are associated in a
orderly manner.

Keyword Driven Framework : Each atomic functionality is
identified in the AUT, written as small functions and named
meaningful. The framework is designed in a way that, we can
call the functions in the testcase excel sheets as a keyword. 

Ex: ClickOnButton is a keyword for performing any click
operation on any kind of button.
 
0 Winner
 
 
Answer
Keyword-driven testing is a Software testing technique that
separates programming work from the actual test steps so
that the test steps can be developed earlier and can often
be maintained with only minor updates, even when the
application or testing needs change significantly.In case of
keyword driven testing, we need to do proper planning and
initial huge effort. Anyway it will give benefit of easy
maintenance and easily adding more test cases/scenarios.

As we see the keyword view in QTP, the keyword driven
testing involves specifying the test steps in below format
Object  Action  parameter
e.g
Browser(“FireFox”).Page(“QualityPointHome”).webEdit(“username”).Set
“QualityPoint”

Here,

->Browser(“FireFox”).Page(“QualityPointHome”).webEdit(“username”)
is the Object.
->”Set” is the Action.
->”QualityPoint” is the parameter.

Here we can change any of the three things to create test steps.
The Keyword Driven framework consists of the basic
components given below

1. Control File
2. Test Case File
3. Startup Script
4. Driver Script
5. Utility Script

1. Control File

a) Consists details of all the Test scenarios to be automated.
b) User will be able to select a specific scenario to
execute based on
turning on or off a flag in the Control File.
c) Control File is in the form of an excel worksheet and
contains columns
for Scenario ID, Execute (Y/N), Object Repository Path, Test
Case File
Path.

2. Test Case File
a) Contains the detailed steps to be carried out for the
execution of a test
case
b) It is also in the form of an excel sheet and contains
columns for
Keyword, Object Name, Parameter

3. Startup Script
a) The Startup script is utilised for the initialization and
reads the control files.
b) It then calls the driver script to execute all the
scenarios marked for execution in the control file.

4. Driver Script

a) It Reads the Test Case files. Checks the keywords and
calls the appropriate utility script functions based on
specific keyword
b) Error Handling is taken care of in the driver script.

5. Utility Scripts

a) Perform generic tasks that can be used across applications.
 
0 Bindu
 
 
Answer
Keyword Driven Framework is a type of QTP Framework where 
for a particular test case, you would first identify a set 
of Keywords and then associate an action (or function) 
which each of these keywords.


'Option Explicit

'Include library files
executefile "C:\Test\Library5.qfl"

'add sheets
datatable.AddSheet "dtSheet1"
datatable.AddSheet "dtSheet2"
datatable.AddSheet "dtLogin"

'import test case and test steps sheets from excel to data 
table
datatable.ImportSheet "C:\Test\testcase.xls","Sheet1","dtShe
et1"
datatable.ImportSheet "C:\Test\testcase.xls","Sheet2","dtShe
et2"
datatable.ImportSheet "C:\Test\testcase.xls","Login","dtLogi
n"

Dim tcrows,tsrows

'get row count from data table sheets 
tcrows=datatable.GetSheet("dtSheet1").GetRowCount
tsrows=datatable.GetSheet("dtSheet2").GetRowCount


For i=1 to tcrows
datatable.GetSheet("dtSheet1").SetCurrentRow(i)
If datatable.Value("Execute","dtSheet1")="Yes" Then
For j=1 to tsrows 
datatable.GetSheet("dtSheet2").SetCurrentRow(j)

If datatable.Value("TCID","dtSheet1")=datatable.Value
("TCID","dtSheet2") Then

Select Case datatable.Value("Keyword","dtSheet2")
Case "openapp"
tsresult= openapp()
Case "login"
tsresult= login(datatable.Value
("Agentname",dtLogin),datatable.Value("Password",dtLogin))
End Select
If tsresult="Pass" Then
TestCaseResult=tsresult
End If
'Else
Exit for
End If
datatable.Value("Result","dtSheet2")=tsresult

Next
datatable.Value("Result","dtSheet1")=TestCaseResult
datatable.Value("Result","dtSheet2")=tsresult
End if
Next

datatable.Exportsheet "C:\Test\testcase.xls","dtSheet1"
datatable.exportSheet "C:\Test\testcase.xls","dtSheet2"
 
0 Deven
 
 
Question   Hi, I am going to attend the H1B visa interview for US during the first week of september. I am a software programmer working on asp.net. I would like to know if the consulate people will ask some technical questions. What all other things should i remember. Rank Answer Posted By  
 Interview Question Submitted By :: Rupraj51
I also faced this Question!!   © ALL Interview .com
Answer
Hi,

Consult people doesn't ask anything related to technical, 
They ask about the client information and what is your role 
and responsiblity...this should be fine to get Visa 
Stamped..
 
0 Muruga
 
 
Answer
Hi!
    Its not neccessary that the honourable consulate will 
not ask technical questions, it only happens when u make 
him not clear or satisfy the first 2-3 questions that what 
role u r going to play in US company, and what u r doing in 
current co.
 
0 Satinderpal Singh
[Financial Technologies]
 
 
Answer
Hi,
   take all the papers you got from your Employer like
   Client Letter or Product Specification, Tax Papers of 
   USA Employer.
     Be Confident at the Interview . 
     Best of Luck.
 
0 Vijayanand
[Financial Technologies]
 
 
Answer
hi,

I cleared my H1B interview and also my passport stamped.
Thank you all for your useful suggestions.
 
0 Rupesh
[Financial Technologies]
 
 
Answer
Hi,

Listen carefully and answer to the specific questions. 
Questions are straightforward 

Question
1. where are you working? 

Answer
Working for JDJ company. thats all.

But, some people will say " I am going to US to develop the 
application for ABC client". 

Be specific, don't be nervous.

All the best.
 
0 Paulraj
[Financial Technologies]
 
 
Answer
I went for the H1B Interview and it went like this.


Consulate: Hey Good Morning.
Me & W: Very good Morning to you.
Consulate: How are you doing.
Me & W: I am doing Good, thank you.
Consulate: Can I have you passport please?
Me: Sure.
Consulate: In which Company you are gonna work in US?
Me: "XYZ"
Consulate: How long you want to stay in US.
Me: I am gonna stay there for one year, and after that I 
will come back to India.
Consulate: Who is your concern person from your company.
Me: "XYZ"
Consulate: Might ask some Project related question like 
(Name of the Project, Roles, Designation, Technology, 
etc...)
Consulate: Are you Married?
Me: Yes.
Consulate: When did you get Married?
Me: Its Exactly two Months.
Consulate: Oh Really, Congratulation.
Me: Thank you very much
Consulate:Do you love your wife?
Me: Yes, Very Much.
Consulate: Do you Love him (Husband)
W: ya I do and very much.
Consulate: What do you like most in your wife?
Me: Her Eyes
Consulate: What do you like most in your Husband.
W: He is very caring, helping, who always takes care of 
mine and as a person he is really a perfect one.
Consulate: It Seems you are getting nervous, but she is 
not. Is it?
Me: No I am okay. I am fine, I am not getting nervous.
Consulate: Ok Allright.
Me: :) :)

Consulate: Thank you very much, you will be receiving your 
passport within 5 working days, have a good day :).

Me & W: Thank You very much and same to you :).



It was I believe 7-8 mins of interview, and we all set. You 
can collect your passport on the same day from the VFS 
office(Mumbai) or if not then it will be sent to you on 
your address mentioned on DS/156-157 Document.

Neeraj
 
0 Neeraj
[Financial Technologies]
 
 
Answer
just go hit that /bith sitting in the cabin thats 
enough you will get H1b visa
 
0 Nandamuri Bala Krishna
[Financial Technologies]
 
 
Answer
Hi, I would be going for a B1 Visa interview in Mumbai after
2 weeks from now, has anyone recently been there can u
please share the questions that were asked. Any tips would
be appreciated. 

Thanks
Priya
 
0 Priya
[Financial Technologies]
 
 
Question   what is soap? Rank Answer Posted By  
 Interview Question Submitted By :: Swapna
I also faced this Question!!   © ALL Interview .com
Answer
SOAP is Single Object Access Protocol
SOAP is simply XML output on HTTP protocol.
 
0 Ashu_jsr
 
 
Answer
Soap is a formatting protocal.
When we send data to the webservice the data will be passed 
in network wire.
That data has to formatted by SOAP. and sends to the 
service.
then the service will give response to that request . This 
data is also formatted by Soap and give it to the client.

SOAP--> HTTP + XML

The format is XML because it is platform dependent . this 
service is used by other applications .
 
0 Suresh.gv
 
 
Answer
soap = Simple Object Access Protocol
It is a simple,lightweight,xml based protocol for 
exchanging information.
 
0 Tapan Gupta
 
 
Answer
soap is nothing but it is a protocol which is used for 
webservices
 
0 Prasanthi
 
 
Answer
SOAP is simply XML output on HTTP protocol.
 
0 Srikanth
 
 
Question   Three thives were caught stealing sheep, mule and camel. A says " B had stolen sheep " C says " B had stolen mule" B says he had stolen nothing. the one who had stolen horse is speaking truth.the one who had stolen camel is lying . Tell who had stolen what? give the steps ... Rank Answer Posted By  
 Interview Question Submitted By :: Sabarish
I also faced this Question!!   © ALL Interview .com
Answer
Three persons are thiefs so they shoulld theaft atleast one
animal.
Any one of them is telling the truth.........
from the problem we know that B is telling lie for sure..
so assume B has stolen camel
now assume a has stolen sheep
so c has stolen mule.

but c has told that B has stolen mule.....wich is false
so C also told a lie......
 now assume c has stolen camel because he told lie
therefore A must have told the truth because other two are
lieng,,,,,

 
ans :A-sheep B-mule c-camel
 
3 Anilkumar
 
 
Answer
answer A- mull, B-sheep, C came
 
4 Had
 
 
Answer
Had is correct ! Anil went in right direction but ended up
with wrong answers

Soln: B lied ( see anil's comment ) which implies B has not
stolen mule. So B could steal camel or sheep.

1) Lets assume B stole camel.
 In that case, A lies ( refer - A says "B had stolen sheep"
), which implies A had stolen sheep ( becoz a lier cant
steal mule ). So A->sheep B->camel C->mule. But this cant
happen because C cant lie ( refer - C says " B had stolen
mule" ).

2) Lets assume B stole sheep.
  In that case, A is true ( refer - A says "B had stolen
sheep" ), which implies A had stolen mule. So A->Mule
B->Sheep C->camel. Here C lies ( refer - C says " B had
stolen mule" )

SO ANS: answer A- mule, B-sheep, C camel
 
5 Premsai
 
 
Answer
When c say B had stolen mule then sure that c is lying
(because only 2 category are there true or lie if c had 
stolen mule then he would have told truth but he pointed on 
B for stealing mule so C is lier) 
c->camel left is  A is truth A->mule so B->sheep
 
0 Shru
 
 
Answer
The question is wrong. In place of horse there should be sheep.
If so then B is tailing the lie =>B=not sheep;
now A is lie because he said"B has stolen sheep"=> C is right(because one should be right) >B=mule;
and C=sheep; and A= camel;
Ans :
A=>Camel
B=>Mule
C=>Sheep
 
0 Suvam
 
 
Question   find out the second highest salary? Rank Answer Posted By  
 Interview Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
select max(sal) from emp
where sal < select max (sal)from emp






Mallikarjun
 
3 Mallikarjun
 
 
Answer
select * from emp 
where &n-1=(select count(distinct(sal)) from emp b 
where emp.sal<b.sal)
 
4 V.karthikeyan
 
 
Answer
select max(empsal) from emp where rownum<=2
 
4 Kiran
 
 
Answer
proc sql;
select id,name,population from populations where 
        population=(select max(population) from   
populations 
where population < (select max(population) from 
populations));
	
	                                                  
quit;
 
0 Shachindra Pandey
 
 
Answer
this is for 2nd highest sal in sql server database

select * from emp where sal=(select max(sal) from emp where 
sal<(select max(sal) from emp))
 
5 Ananth
 
 
Answer
select salary from(select rownum as r,salary from(select
rownum,salary from emp order by salary
 desc))where r=2;
 
5 Shiv Prakash
 
 
Answer
SQL> select sal
  2     from (select sal,
  3                  row_number() over
  4                      (order by sal desc ) rn
  5             from emp )
  6    where rn = 2;

       SAL
----------
      3000

SQL>
 
0 Peter
 
 
Answer
SQL>  select max(sal) sal
  2     from (select sal,
  3                  dense_rank() over
  4                     (order by sal desc) rnk
  5             from emp )
  6    where rnk = 2;

       SAL
----------
      3000

SQL>
 
0 Peter
 
 
Answer
select min(a.sal) from(select distinct d.sal from emp d 
order by sal desc) a where rownum<=2;

To retrieve all columns

select * from emp where sal=(select min(a.sal) from(select 
distinct d.sal from emp d order by sal desc) a where 
rownum<=2);
 
0 Abhijit Ramakant Parb
 
 
Answer
@peter: your query is pretty cool but it wont work when 
there are multiple salaries with same amount. I mean three 
persons have same salary 24000, which is MAX sal in salary 
table. In that case, below query will work.

select a.salary from employees a where 1 = (select count
(distinct b.salary) from employees b where 
a.salary<b.salary) 

Digit 1 is (n-1) where n is nth value. Here n is 2(Second 
highest salary).

I would appreciate if anybody tried to break my above query 
and explain how does this work.
 
4 Priyankur
 
 
Answer
select max(sal) from emp where sal not in(select max(sal) 
from emp);
 
0 Hiten
 
 
Answer
select * from emp e1 where (3=(select count(distinct
(e2.sal))from emp e2 where e2.sal>=e1.sal));
 
0 Padiya Hiten
 
 
Answer
SQL>  select max(sal) from emp where sal<(select max(sal)
from emp);

  MAX(SAL)
----------
      3000
 
0 Prasant
 
 
Answer
PROC SQL;
SELECT MAX(SALARY) FROM RIGHTMER1
WHERE SALARY < SELECT MAX (SALARY)FROM RIGHTMER1;
QUIT;
 
0 Radhiv Kumar
 
 
Answer
step 1=write a query for maximum salary.
step 2=make a sub query of step 1 
step 2    a)let X==sleect all row from your table(employee)
          b)let Y=select maximum salary from employee
NOw       c)wrie X-Y


Syntax is:
       select MAX(salary) from employeee((select * from 
employee)-(selcect MAX(salary) from employee))
 
0 Kamal
 
 
Answer
select * from emp
 where &n=(select count(distinct(sal)) from emp b
 where emp.sal<=b.sal)
 
0 Nusrath Sultana
 
 
Answer
select salary from emp order by salary desc limit 0,1;
 
0 Tejinder
 
 
Answer
selec * from emp e1 (n-1)=(select count(distinct(sal) from 
emp e2 where e1.sal<=e2.sal))
 
0 Naveen
 
 
Answer
select min(sal) from emp where sal in (select top 2 sal from
emp order by sal desc);
 
0 Sumeet
 
 
Answer
SELECT e.lastname,e.salary FROM employees e
    WHERE 1=(SELECT count(*) FROM employess s
                      WHERE s.salary>e.salary
   

that will return 2nd highest salry .if we place insted of 1 
as 2 then we can get 3 rd highest salary .
 
0 Annada
 
 
Answer
select sal from(select sal,rank() over(order by sal desc)
rnk from emp) e
where e.rnk=2;
(OR)
select rownum,sal from emp group by sal,rownum
having rownum=2;
(OR)
select rn,sal from( select rownum rn,sal from emp group by
sal,rownum order by sal desc)
where rn=2;
 
0 Hari Kanth
 
 
Answer
select max(sal) from emp
where sal <(select max (sal)from emp);
 
0 Karthikeyan
 
 
Answer
select * from empdetails where sal=(select max(sal) from
empdetails where sal<(select max(sal)from empdetails));
 
0 Aravind
 
 
Answer
select max(sal) from emp where sal<(select max(sal) from emp);
 
0 Premsagar12
 
 
Answer
second highest salary department wise query would be this

select e.dept_id,e.salary,e.emp_name,e.rank from (select
dept_id,emp_name,salary,dense_rank() over (partition by
dept_id order by salary desc nulls last) rank
from employee)e
where e.rank = 2
 
0 Raghu
 
 
Answer
select max(salary) from employee
  whrere salary<(selsect max(salary) from employee)
 
0 Chaitanya Pathak
 
 
Answer
SELECT SALARY FROM (SELECT SALARY FROM emp WHERE ROWNUM < 3 
ORDER 
BY salary) WHERE ROWNUM < 2
 
0 Anand
 
 
Answer
SELECT * FROM 'emp` WHERE salary < ( SELECT max( salary
)FROM emp ) ORDER BY salary DESC LIMIT 1 

This is Mysql syntax, if you use Oracle just remove LIMIT 1
and put it ROWNUM=1;
 
0 Thananjayan
 
 
Answer
SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal)
 
0 Sikindar
 
 
Answer
select max(salary) from employee where 
salary<(select max(salary) from employee)
 
0 Amulya Kumar Panda
 
 
Answer
to all the people who are using rownum in their queries...

This query will not work if you have more than 1 person 
having the second highest salary
 
0 Raunaq
 
 
Answer
select emp_id,sal from ( select emp_id,sal from emp where
sal < ( select max(sal) from emp) order by sal desc ) where
rownum < 2;
 
0 Akash
 
 
Answer
select max(salary) from employee where salary<(select max(salary) from employee);
 
0 Ishrat Ali
 
 
Answer
SELECT LEVEL,MAX(SAL)
FROM EMP
WHERE LEVEL IN(2,3)
CONNECT BY PRIOR SAL>SAL
GROUP BY LEVEL;
 
0 Nagaraju
 
 
Answer
select max(sal) from emp where sal<(select max(sal) from emp);
 
0 Sandeep
 
 
Answer
select min(salary)
  from (select distinct salary
          from employee
      order by salary desc)
 where rownum <= 2
 
0 Anitha
 
 
Answer
select *from (select empno,deptno,min(sal) from emp
group by empno,deptno,sal 
order by sal desc)
where rownum<=1
 
0 Madan Kumar
 
 
Answer
select max(salary) from emp where salary < Top Salary
 
0 Digvijay
 
 
Answer
SQL> select salary from(select salary,rownum a from(select salary from employee order by salary desc))where a=2;
 
0 Prem
 
 
Answer
select max(salary) from employee where salary not in (select max(salary) from employee);


This worked :)
 
0 Souri Sengupta
 
 
Answer
select *
from 
(select empno,ename,sal,rank() over(order by sal desc) 
ranking from emp)
where ranking=2;

and u can find the nth highest sal by replacing 2 by your 
number
 
0 Yaseen Syed
 
 
Answer
SELECT ID,NAME,SAL,ROWNUM
FROM EMP
ORDER BY ID DESC
WHERE ROWNUM=2
 
0 Shalini
 
 
Answer
SELECT DISTINCT (a.sal) FROM EMP A WHERE 2 = (SELECT COUNT
(DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal);
 
0 Sujeet Sinha
 
 
Answer
Guys try this to get 2nd highest salary

select max(salary) from employee where salary not in (select
max(salary) from employee)
 
0 Anil
 
 
Answer
We can use an OLAP function
select * from
(select ename,sal,dense_rank() over(order by sal desc)
rankings from emp ) a
where a.rankings = 2;
 
0 Mahesh
 
 
Answer
Second highest Value

select max(user_id) from users
where user_id < (select max (user_id) from users)


Mukesh Narayan SIngh
09873595976
mukeshnsingh22@gmail.com
 
0 Mukesh
 
 
Answer
select min(marks) from (SELECT sid FROM(SELECT sid FROM STUDENT ORDER BY SId desc) WHERE ROWNUM <=2);
 
0 Yobu
 
 
Answer
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP n salary
FROM employee
ORDER BY salary DESC) a
ORDER BY salary
 
0 Ved
 
 
Answer
SELECT max(salary) FROM Employee WHERE salary NOT IN 
(SELECT max(salary) FROM Employee);
 
0 Mahendra
 
 
Answer
select sal from emp e
where 2=(select count(distinct sal) from emp b where 
b.sal>e.sal)
 
0 Subash
 
 
Answer
select top(1) * from employee where salary in (select
distinct top(2) salary from employee order by salary desc)
order by Salary




Above query is dynamic, if u want 3rd highest then just
change 2 to 3 , Please Try It
 
5 Janmejaya
 
 
Answer
SELECT DISTINCT SAL FROM EMP E1
WHERE 2=(SELECT COUNT(DISTINCT SAL) FROM EMP E2
WHERE E1.SAL <= E2.SAL);

OUTPUT= 3000
 
0 Asit Kumar Sahu
 
 
Question   The Joint session of both the Houses of the Parliament is presided over by (1) The President (2) The Prime Minister (3) The speaker of Lok Sabha (4) The Chairman of Rajya Sabha Rank Answer Posted By  
 Interview Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
( 3 ) The speaker of Lok Sabha
 
5 Guest
 
 
Answer
The President
 
0 Sree
 
 
Answer
chairman of rajya sabha
 
0 Anubhav
 
 
Answer
2
 
0 Ramanaraju
 
 
Answer
Speaker of loksabha
 
0 Janardhan
 
 
Answer
prime minister
 
0 Arunkumar
 
 
Answer
speaker of lok sabha
 
0 Tech
 
 
Question   What did you do yesterday. Rank Answer Posted By  
 Interview Question Submitted By :: Pankaj
I also faced this Question!!   © ALL Interview .com
Answer
yesterday i went to mumbai to meet my parents
 
0 Aditya
 
 
Answer
What did you do yesterday??
	
	Yesterday, I slept late night, so I woke up around 
10:30 A.M. Then as usual brush my teeth and took a bath and 
had strong cup of tea.
	At after then I got call from my friend, he 
inviting me for the shopping.
	I accepted and we both went to C.P.(Connaught 
place). We both were enjoying a lot. When I come back to my 
home, it was too late. So I prepared my dinner and I have 
it and got back to bed for sleep.
 
3 Pankaj
 
 
Answer
Yesterday I got up at 6 a.m. and as usual  i went to toilet 
aftye after that ihad brushed my teath after that i went to 
morning walk and did some workout there after one hour i 
came back and bath after that i had my breakfast.after  
that i read news after all that i moved to my friend home 
where again took breakfast along with my friend after that 
we went to  shoping mall where we bought some apparels and 
also shoes and did lunch there  we enjoyed very much and in 
late eve we came back to home an 9 p.m. i  had my dinner at 
my home after all that iwent to  bad to sleep. 
That was my yesterday
 
1 Wasem
 
 
Answer
Yeasterday i gotup 4.00  i bresh up my teeth after that i 
took bath after that i did some other work afterthat i had 
started my study  and after 1 hrs my fr called me she 
invited me going for shoping that its
 
1 Veena
 
 
Answer
i woke up around 11 .and i wen to toileta. the i went to 
shopping,as i was walking home yesterday i saw  a bad 
accident, i saw as a man was gettig of the bushe slipped 
and brok his leg
 
0 Arab
 
 
Answer
yesterday i got up early in morning at 4:00am after that i 
went to toilet and brush up my teeth then i did yoga for 
0ne and half hour then dawn was on the mark and i started 
my day work thereafter i went for morning walk and got 
fresh air,morning walk is very useful for health.so i came 
back at 7:00 clock ot my lodge then prepared breakfast and 
have it with strong tea there after i got  a friend call he 
invited me for shopping.
i accpted call and went both for the market for shopping 
and we spent whole together and took lunch at market 
afterthat we come back to lodge then prepared dinner and 
slept at about 10:00 o clock.
that was my yesterday.
 
0 Ghanshyam
 
 
Answer
yesturday i woke up at 12 and without doing brush i had sm
food and i went back to sleep
 
0 Sudippaul
 
 
Answer
yesterday i woke up at 6.30 am in the morning then i
freshened up after that i went for jogging the weather
yesterday was quite chilly and it was an really exelerating
experience .after that i had my breakfast then i checked
some mails on the internet then i had my lunch and i took my
afternoon nap after that i did some research on internet and
then went to sleep after having dinner......
 
2 Kushveer
 
 
Answer
I got up in the morning at 7am then I freshened up  myself 
after that I did some exercise. At 8 am I took my breakfast 
and got ready for the office. I left my home at 9:30 am and 
went to the office. Yesterday my boss appreciated me as I 
had completed the task before the deadline. At 2PM I got 
the office break and I took my lunch.After that I was again 
back to my work. At 7 pm I logged out my system and 
returned to my home. I took some rest and spent sometime 
with my friends. At 9pm I took my dinner and listened some 
music. At 10 pm I moved to the bed and slept.
 
4 Akshat
 
 
Answer
i got up early in the morning 6.am after that I fleshed up
and after that i went stadium and I played a mach I made a
125 run I took 4 wicket after that I came back to home than
i prepared a comfy that I took a breakfast at 10.am  after
that I went to G I P and bought a some clothes and some
frute than I came back to home 2 pm after that I wached a
t.v sereal 
Patagonian and pavt rita after than I did work on internet
and and I did study and after that I came to a e I attened a
coversation class and i reved a chandel clss than i came
back to home8 pm after that I did study 11.pm and after that
I took denar than I went to bed
 
2 Udit
 
 
Answer
Yesterday I woke up at 8am then i did my usual activities freshning up and all that.As I had to appear for the interview  the same day at 11 am so i got dressed n after having my breakfast I went to metro station to reach the venue for interview.I had appeared for the interview of Genpact(BPO Co.)and I was through till four rounds but I couldnt clear the fifth round. I was a little bit of disappointed but since it was my first interview as a fresher I got an overview of what is asked during interviews and the fields where I was lacking. So i made up my mind to face the upcoming interviews with more confidence .It was 6 pm when I left the venue and then I came back to home around 8 pm. I just relaxed for some time  , had my meal , then I surfed the net for an hour and at 11 pm I slipped into my bed with the dream of achieving my goal the next day.
 
0 Varun
 
 
Answer
Yesterday As usual i got up early in morning. got Fresh... 
I am fond of morning walk thats why went for morning walk.. 
Yesterday it was to hot day.. Hence did not go somewhere?

In evening did go for internet search in cyber cafe spent two hr there & came back to my home. I got prepared the dish, i had the dinner ... Went for bed for again wakeup in early morning of next day.
 
0 Avi Kumar
 
 
Answer
Yesterday was quite a bus schedule for me..I got up in the
early morning at 4AM and took a glass of fresh water as it
provides freshness for the whole day then I washed my face
and eyes with water and got ready for a daily routine
morning walk as it is must to keep our body fit and healthy.
I returned to home at 6AM from morning walk then brushed my
teeth and went to toilet. Around 6:30 Am I went for a
routine bath. It took me 15 minutes while bathing and after
that I combed my hair and prepared my breakfast with a
refreshing cup of tea. After that I switched on the
television and got tuned to the music channel. Meanwhile
after 1 hour my old friend called me for a get together at
his home........
 
0 Ojasvi Bhatia
 
 
Answer
yesterday is a sunday thats iam got up at 7am and i breshed 
my teeth and i took a storng cup of tea then i went to play 
ground, their we played cricket up to 11:30 am. i return 
back to home took a bath then i attended to my friend 
marriage function. at the evening me and my frend went to 
the beach.there we enjoyed lot.
 
0 Santhosh
 
 
Answer
Yesterday I got up at 8:00am , did my daily chores , then i got a call from my friend around 10:00am while i was preparing my breakfast , so he invited me for lunch to his place , post my breakfast i got ready wore my favorite attire , which is my white T Shirt and Blue Jeans , I boarded the metro from Saket to Gurgaon , i reached Gurgaon in time and there i met my friend and from there we went to his place , As i was expecting there were other friends too , I had a gala time with them , the lunch was amazing because it was Mughlai , around 8 pm my friend dropped me at the metro station , around  10:30pm i reached Saket and then from there i drove my car and then reached my home in no time and then i rushed straight to my bed as i was too sleepy , so i slept around 11pm.
 
0 Ample Jobs Solutions
 
 
Answer
i got up early in the morning 6.am after that I did some sex
and after that i went stadium and I did some more sex in 
that i make many bigholes in my new volley ball girls 
of my school  after that I came back to home than i did 
some little sex
i prepared a comfy that I took a breakfast at 10.am  after
that I went to G I P and did some medium sex than I came 
back to home 2 pm after that I wached a
t.v sereal 
Patagonian and pavt rita after than I did sex on internet
and and I did sex and after that I came to a e I attened a
coversation class ther i did remaining part of sex and i 
reved a chandel clss than i came
back to home8 pm after that I did study 11.pm and after that
I took denar than I went to bed for more sex
 
0 Man Mohan Singh
 
 
Answer
yesterday i got up early in the morning at 6.am,after that i
freshened up and took my breakfast and went to my
hostel.after that  i got ready for my class and went to my
class  ,after that at 1.oop.m i got class break and took my
lunch.then after finishing my class i went back to my home
and took my bath .then i took some rest and after that i did
my journels and at 10p.m i took my dinner then went to bed
 
0 Tasbina
 
 
Answer
always use verb 2nd form like went in place of go and came in place of come and took in placeof take
 
0 Tazeem Saifi
 
 
Answer
yesterday i woke up around 9 am.Then as usual brush my teeth
n took bath.then i read newspaper with strong cup of tee.thn
i took my breakfast.Aftr that i made a program to do
shopping with my frnds..den i called all of my frnds to get
together..after dat v went to some mall n did some
shopping..we took lunch der.. i came back home aroung 6.den
i took some rest..n had a cup of tea..den i chat with my
frnds  in the internet till 8 pm..aftr dat i watched tv n
had my dinner....after dat i went to bed atound 10 pm n
slept...dat was my yesterday...
 
0 Tushar
 
 
Answer
Hi,
I woke up at sharp 8 o clock in the morning then went to toilet and brush up my teeth. At 9 o clock took bath and after few minute a got a call from my friend ,he invited me for shoping so at 10 o clock I went to khan market and purchaged one office bag .arround 2 oclock I felt ,I got late for my dance class arround 5 o clock i reached my home .when i entered in my home father asked me how was the day ! I felt scare and went to badroom  when opened my eye i felt date has been changed
 
0 Sanjeev Kumar
 
 
Answer
Yesterday, I slept late night so I woke up around 10:00 A.M. Then as usual brush my teeth and took a bath and had strong cup of tea.
	And after then I got call from my friend, he invited me for the shopping.
	I accepted and we both went to Nehru Palace. In Nehru Palace we both went to the showroom of Cameras. We bought there a Sony Cyber shot cam. It was built in various type of functionality such as it had Carl Zeses lance, motion sensor etc. We both were enjoying a lot. When I come back to my home, it was too late. So I prepared my dinner and I have it and got back to bed for sleep.
 
0 Anurag Singh
 
 
Answer
i woke up early in morning then after brush My teeth n took
a bath then I want to My kitchen For a tea then after I got
a Newspaper n saw a job column then I prepared Myself for
interview after then I want to interview location I finish
My interview n I come back to My home is too late but I
prepared My launch and I have it then after i want to My 
friend house i pass same time our there after then i come
back to My home  after then i did some other work n then
dinner took My dinner then after i went to bed .............
 
0 Emran Khan
 
 
Answer
I didn't do anything yesterday...........
 
0 Musty
 
 
Answer
i woke up early in the morning
 
0 Mohd Sharib Usmani
 
 
Answer
first of all,after getting up early in the morning,i recite
the holy Quran.after that offering prayer i took breakfast
then said good bye to all members of my home,went to school
named educator school kamoke in pak town.after that i
performed my duty very honestly,with hard work.
 
0 Muzammil Hussain
 
 
Answer
Yesterday i had to get up early in the morning at 6 am after that i got fresh then i took tea after that i went to the hospital with my aunt y actually she has some problems in her legs. then i had to stay there for long about 3 or 4 hours. ^Then i came from there after that i had lunch at 2 o clock then i started studying after that one of my friends called me and he requested me for making presentation . Then i had to go to his place then i did his work after that i went to the park with my friends at 5 o clock and we played cricket over there for 1 hour then i came back to home after that i went to the market at 6.30 for buying some domestic things with my cousin. then we too Momos in the market and came back to home. after that i watched news for 1/2 hour then i started studying for 2 hours then i had dinner with my all family members. After that i opened my laptop and i checked mail and chat with some of my friends on Facebook. At 11 o clock i went to the bed and i got lost in my dreams. That's it about my yesterday
 
0 Ankit Vats
 
 
Answer
i woke up at 2 pm ,took the shower,had my breakfast/lunch because this is my daily schedule as i work in night-shifts .then i watched movie on my laptop and after some time i got ready for my cab and went to my office.)
(there i worked hard as usual and next morning again went to my home and slept)
 
0 Abhishek Singh
 
 
Answer
Yesterday i woke up at 7 in the morning and then i took a bath.After that i took my breakfast.Then i went to my office and worked for 8 hours.After that i came back to my home and took my evening tea.Then i went to my friends home and did some chit chat.After that i took my dinner at 9 and watched the T.V.programme.After that i went to my bed and slept..
 
0 Abhay Mangla
 
 
Answer
Yesterday I got up around 5.30am.Then as usual I brushed my teeth and got freshed in half an hour.As it was my fast yesterday I prayed at home and after some time I went to the temple.Then i came back home and studied continously for couple of hours as i m preparing for govt exams.Then around at 5pm in the evening I got a call from my frnd he invited me for  playing cricket.after playing cricket too long I came back at 8pm then I quickly taked a bath nd straight away went for the eveng puja then i had a lightdinner of my fast.As I felt  very tired I straight forward went to my bed..
That all I did yesterday.............
 
5 Sumit Rawat
 
 
Answer
I GOT UP 7 AM .  AFTER CLEANED TO MY SELF . I TOOK BREAKFAST AROUND 7:30. AFTER FINISHED MY BREAKFAST I SLEPT AND I WOKE UP 11 AM THEN I WEND FOR COOK . AND I TOOK BATH 12:30 THEN I TOOK MY LUNCH. I OPENED MY LAPTOP AND CONTINUOUS I WATCHED 3 MOVIES CAPTAIN AMERICA , PURSUIT OF HAPPYNESS, THE WAY BACK . THEN IT WAS TO LATE IT WAS AROUND 10 PM AND THEN I DID MY DINNER . AFTER DINNER I WENT TO SLEEP.
 
0 Anirudh Yadav
 
 
Answer
Yesterday I woke up early morning at 5 AM, I have complted my daily activities like Brushing teeths, Wash up my face till 5-30 AM. After that I went to Gym to do Exercise till 7 AM. I Came to home to take bath and I had a Breakfast till 8 'o' clock. From 8 to 9 AM  I wen to my Office by bus when I was sit into the bus I red news paper. I reached my office around 9 'o' clock  from 9 AM to 4 PM I worked in my office. After that I went to happy hour with my two colleges. We spent about two hours untill 6 'o' clock catching up, eating and talking after happy hour I went to home. I got my home around 7 PM. After that  I took a shower and watched TV for a while. I went to bed around 10 PM.
 
0 Gangu Raghu
 
 
Question   What is hard code & soft code? Rank Answer Posted By  
 Interview Question Submitted By :: Devnaga
I also faced this Question!!   © ALL Interview .com
Answer
Hard code is the code directly used in the program. Soft 
code gets the information dynamically from outside. For 
example, to get the database connectivity, if we passed the 
url, username & password for thin drivers in the 
programming itself is hard coding. At the same time, if we 
create a jndi for the above in config & get it in the 
program using jndi name is softcode. It is becoz to change 
the db connectivity settings we need not modify the program.
 
3 Devnaga
 
 
Answer
Hard code is the code which is to be used before finalized 
one. It can be changed by the programmer before going to 
finalised.
 
0 Sivakumar
 
 
Answer
hard code is nothing but fix up  values to variables for 
end of application 
eg:String s="chandu"; here chandu is fix up for the 
variable--> s

softcode is getting values dynamicaaly from outside like 
xml or database and placing into variables

eg:String s=""; it can be any thing like chandu or ramu
 
4 Chandu
 
 
Answer
value given at runtime is called softcode and value which 
is static and given at the time of creation of the program 
is called hard coded.
 
1 Gaurav Agrawal
 
 
Answer
The value of the variable assigned in the code itself is
called Hard Coded.
Instead of this assigning the value at runtime/dynamically
is called Soft Coded.
 
0 Ohm Nathan
 
 
Answer
To "hardcode" is to write an absolute value (not a variable or another dynamic data) directly in an application's source code. It's sometimes necessary for e.g. to provide fixed installation path or to detect the piracy or counterfeiting etc.
 
1 Razorx
 
 
Question   What is subreport? In one report maximum how many subreport we can insert? Rank Answer Posted By  
 Interview Question Submitted By :: Kalpesh
I also faced this Question!!   © ALL Interview .com
Answer
Subreport is like the main report however the values from 
the subreport can be passsed to the main report. If we wish 
to link the subreport to the main rport then it is called 
as a 'Linked Sub report' else it is a 'Un linked Sub 
report'. Any number of sub reports ca be placed in a main 
report. However the maximum number being 256. In practise 
you would never have so many sub - reports in a main 
report.
 
5 Vj
 
 
Answer
256
 
2 Ravi Kumar Noneria
 
 
Question   we have a link in a website or webtable How can we record link in that table or site? link is not static we don't know exact location of that link? how ? if u know pls give reply with script also? Rank Answer Posted By  
 Interview Question Submitted By :: Veda
I also faced this Question!!   © ALL Interview .com
Answer
I think with discriptive programing  but i don't know how
to use that discriptive programing in this situation.
 
0 Veda
 
 
Answer
Descriptive programming will solve this problem. You have 
to write the property name and you can assign the dynamic 
value of that property. The problem with descriptive 
programming is, if you are using descriptive programming 
for the top level object you have to use the descriptive 
programing for the child objects also. But if you are using 
it for child objects you dont neet to use for parent 
objects.

Example of Descriptive Programming:
JavaWindow("title:="&Value12).Activate

here title is the Object Property. And Value12 is its 
value. you can use dataTable also for the value

Example:
JavaWindow("title:="&DataTable
("Value",dtLocalSheet)).Activate
 
0 Naaz
 
 
Answer
rowcount=b().p().webtable().rowcount()
for i=2 to rowcount
set obj_lnk=b().P().Webtable().childitem(i,j,"Link",0)
obj_lnk.click
 
0 Geeta
 
 
Answer
for a website
bro=""
url=""
set desco=description.create
desco("micclass").value="link"
with browser("title:=give respctive browser title name")
set lis=page("title:=give respctive browser title name").childobjects(desco)
ls=lis.count
for i=0 to lis-1 step 1
x=lis(i).getroproperty("name")
y=lis(i).getroproperty("url")
print(x&" "&y)
 
0 Akshay Soni
 
 
Answer
I just saw an answer which has mentioned above as:

rowcount=b().p().webtable().rowcount()
for i=2 to rowcount
set obj_lnk=b().P().Webtable().childitem(i,j,"Link",0)
obj_lnk.click

but this isn't 100% appropriate code, the script may fail 
why
Ex: here we are trying to click on the link through every 
row of the webtable, suppose the 3rd row doesn't contain 
any link then "obj_lnk.click
will fail because there is no link present in that row so 
the exact and write code will be as :

rowcount=b().p().webtable().rowcount()
for i=2 to rowcount
  if b().pa().webtable().childitemcount(i,j,"Link",0)<>0    
then
set obj_lnk=b().P().Webtable().childitem(i,j,"Link",0)
obj_lnk.click
end if
end for
 
0 Jyotikrushna Mohapatra
 
 
Answer
If we know the name of the name of that link then u guyes
can follow the below code....
In the above code how are you getting the value of j(i.e
column no). We are supposed to check each and every row &
column.
so I would like to add few lines in the above code,

rowcount=B.P.Webtable().rowcount
colCount=B.P.Webtable().columncount(rowcount)

For i=1 to rowcount
  For j=1 to columncount
   If B.P.Webtable().ChildItemCount(i,j,"link")<>0 then
     set oLink=B.P.Webtable().ChildItem(i,j."link",o)
     ''oLink.(your desired operation)
     y=oLink.GetRoProperty("Name")
      If trim(y)= trim("Name of that link") then
        oLink.Click
      End If
    Exit for
   End If
  Next
Next
 
0 Shekhar
 
 
Question   what is slice & dice? Rank Answer Posted By  
 Interview Question Submitted By :: Mathi
I also faced this Question!!   © ALL Interview .com
Answer
slice and dice is to arrange the the data in differnt ways.
it can chage as rows to columns  and columns to rows.
 
0 G.v.subramanyam
 
 
Answer
The ability to move between different combinations of 
dimensions when viewing data with an OLAP browser.

Multidimensional analysis tools organize the data in two 
primary ways: in multiple dimensions and in hierarchies.

Slicing and dicing refers to the ability to combine and re-
combine the dimensions to see different slices of the 
information. Picture slicing a three-dimensional cube of 
information, in order to see what values are contained in 
the middle layer. Slicing and dicing a cube allows an end-
user to do the same thing with multiple dimensions.
 
0 Chaitanya
 
 
Question   how can u draw a rectangle in C Rank Answer Posted By  
 Interview Question Submitted By :: Sandipan
I also faced this Question!!   © ALL Interview .com
Answer
BY USING PRINTF AND SCANF
 
3 Vincent
 
 
Answer
Using a rectangle(int,int,int,int)function of c graphics.
 
3 Ketan Bhavsar
 
 
Answer
using include<graphic.h>
 
0 Soumya
 
 
Answer
using ASCII codes and then using goto statements
 
0 Sumit
 
 
Answer
using rectangle(int,int,int,int)
               <left,top,right,bottom>
it is a function in graphics.h
 
4 M.d.balaji
 
 
Answer
USING rectangle(int,int,int,int)
it is a function in graphics.h
 
0 M.d.balaji
 
 
Answer
including graphics.h
then initialising graphics system using initgraph
and using the function rectangle(int left,int top,int 
right,int bottom)
 
5 Sala
 
 
Answer
no answer
 
0 Guest
 
 
Answer
using rectangle(int right,int top,int left,int bottom) in 
graphics.h
 
0 Suganya
 
 
Answer
first include the graphics.h file 
thus you can use the rectangle funtion give the proper 
parameters and the wor is done
 
0 Azad
 
 
Answer
Divide by Zero.
 
5 Anonymous
 
 
Answer
BY using #include<graphics.h>
we can draw rectangle.
The syntax is rectangle(int ,int ,int ,int)
{left,top,right,bottom}
 
0 Venkat
 
 
Answer
printf("____________________");
printf("\n|\t\t|\n|\t\t|\n|\t\t|\n|\t\t|");
printf("____________________");

    by this way i think can be possible,though some 
adjustment may required...as per size of VDU.As per my 
opinion intervier asked for this answer....as C graphics is 
not so popularly used.
     Pardon me if i'm wrong & can also mail to me.
 
0 Subhradip
 
 
Answer
line(x1,y1,x2,y1)
line(x1,y2,x2,y2)
line(x1,y1,x1,y2)
line(x2,y1,x2,y2)
 
0 Venkatesh
 
 
Answer
/*  simple.c
    example 1.0
*/
#include<graphics.h>
#include<conio.h>

void main()
{
    int gd=DETECT, gm;

    initgraph(&gd, &gm, "c:\\turboc3\\bgi " );
    rectangle(200,50,350,150); 

    getch();
    closegraph();
}
 
5 Raj
 
 
Answer
/*  simple.c
    example 1.0
*/
#include<graphics.h>
#include<conio.h>

void main()
{
    int gd=DETECT, gm;

    initgraph(&gd, &gm, "c:\\turboc3\\bgi " );
    rectangle(200,50,350,150); 

    getch();
    closegraph();
}
 
0 Mahendra Microsoft
 
 
Answer
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int driver,mode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\tc\\bgi");
rectangle(100,100,250,250);
getche();
closegraph();
}
 
0 Sunny Khanna
 
 
Answer
line(x1,y1,x2,y1)
line(x1,y2,x2,y2)
line(x1,y1,x1,y2)
line(x2,y1,x2,y2)

initgraph(&gd, &gm, "c:\\turboc3\\bgi " );
    rectangle(200,50,350,150);
 
0 Santosh
 
 
Answer
to use follows

rect(x1,y1.x2,y2);
 
4 Arthanari R
 
 
Answer
using turboc2 editor
 
0 Ganesh
 
 
Answer
using pen & scale
 
5 Shiju
 
 
Answer
First we insert the graphics mode into your complier,and we
use the function rectangle(); in the rectangle function we
specified the length and breath,and we also specified where
the place in screen the rectangle is drawn.
 
0 Senthilkumar
 
 
Answer
include graphics.h

rectangle(int,int,int,int)

closegraph()
 
2 Shruti
 
 
Answer
include the header file graphics.h 
use the built in function rect(x1,y1,x2,y2)
such that (x1,y1) and (x2,y2) are the coordinates
 
0 Ram Kumar
 
 
Answer
#include
#include
#include
main()
{
int gd=DETECT, gm,x,y;
int arr[]={540,220,590,270,570,320,510,320,490,270,540,220};
initgraph(&gd,&gm,"c:\\tc\\bgi");
x=getmaxx();
y=getmaxy();
setcolor(GREEN);
printf(" \n value of x = %d",x);
printf(" and the value of y = %d",y);

rectangle(5,40,140,200);
outtextxy(x/30+15,y/8+5,"Rectangle");

drawpoly(6,arr);
outtextxy(515,270,"Polygon");
setcolor(RED);
line(0,49,639,479);
line(0,0,0,479);
line(0,0,639,0);
line(639,0,639,479);

getch();
closegraph();
restorecrtmode();
}
 
0 Prabhanjan
 
 
Answer
#include<stdio.h>
#include<conio.h>
void main()
{
	int i,j,n;
	clrscr();
	printf("Enter the value of n\n");
	scanf("%d",&n);
	for(i=0;i<=n;i++)
	{
		for(j=0;j<=2*n;j++)
		{
			if((i>0 && i<n) && (j>0 && j<2*n))
			{
				printf("  ");
			}
			else
			{
				printf("* ");
			}
		}
		printf("\n");
	}
	getch();
}
 
3 Shrikant
 
 
Answer
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
int main()
{
 int driver,mode;
 detectgraph(&driver,&mode);
 initgraph(&driver,&mode,"...\\bgi");
 setcolor(8);
 for(i=10;i<201;i++)
 {
   sound(i);
   rectangle(200,50,350,150);
   delay(1000);
   nosound();
 }
getch();
}
 
0 Vignesh
 
 
Answer
why do you want to draw rectangle using C if you can do it 
in a paper its more simpler and faster, no developer 
required hence cost effective.
 
0 Joker
 
 
Answer
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

int main(void)
{
   /* request auto detection */
   int gdriver = DETECT, gmode, errorcode;
   int left, top, right, bottom;

   /* initialize graphics and local variables */
   initgraph(&gdriver, &gmode, "");

   /* read result of initialization */
   errorcode = graphresult();
   if (errorcode != grOk)  /* an error occurred */
   {
      printf("Graphics error: %s\n", grapherrormsg
(errorcode));
      printf("Press any key to halt:");
      getch();
      exit(1); /* terminate with an error code */
   }
 
0 Nitheesh
 
 
Answer
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int driver,mode,x1,y1,x2,y2;
driver=DETECT;
initgraph(&driver,&mode,"c:\\tc\\bgi");
printf("Enter(x1,y1) and (x2,y2) co-ordinate values");
scanf("%d%d %d%d",&x1,&y1,&x2,&y2);
rectangle(x1,y1,x2,y2);
getche();
closegraph();
}
 
0 Ramesh B Penchal
 
 
Answer
Firstly we can use header file............
#include<graphics.h>

Steps to make rectangle in c.

1.Make main function
2.Detect graphic by using (int a=DETECT),(initgraph(&a,"c:\
\tc\\bgi");
3. Now use the value of x and y cordinates.
4. After that use the func. rectangle(int,int,int,int).
5. Now use line(0,0,0,0) set the value according to 
u...........
 
0 Rahul Singh
 
 
Answer
These are all non-standard libraries for graphics, they
arent used at all in today's date. They are libraries which
where introduced 20 yrs back and same with turbo C!
 
0 Swatter
 
 
Answer
Draws a rectangle (graphics mode)

Declaration:
 void far rectangle(int left, int top, int right, int bottom);
draw a rectangle in c using the header file for
#include<graphics.h> and using function for
rectangle(int,int,int,int);

for example 

rectangle (int x1,int y1,int x2,int y2)
x1,x2,y1,y2 is an integer datatypes and given the values.

rectangle(100,150,200,250);
 
0 Chinnadurai.s
 
 
Answer
by using the hand with pen and scale
 
0 Natarasan.k
 
 
Answer
Include graphics library
then either use rectangle function in it or using line fuction
adjust coordinates for it to make a rectangle
 
0 Akshay
 
 
Answer
#include<graphics.h>
#include<conio.h>
#include<stdio.h>
void main()
{
int gdrive=DETECT,gmode;
initgraph (&gdrive,&gmode,"c:\tc\bin");
rectangle((50,50),(50,100),(100,100),(100,50));
getch();
}
 
0 Priyanka
 
 
Answer
With the help of 
 
rectangle(int x1,int y1, int x2 ,int y2)

we pass 4 parameter x1 , y1 ,x2, y2 ;
where x1 is top left co-ordinate
      y1 is top right co-ordinate
      x2 is bottom left co-ordinate
      y2 is bottom right co-ordinate
 
0 Sandeep Mishra
 
 
Answer
rectangle
 
0 Logeshwaran
 
 
Answer
#include<stdio.h>
#define n  5
#define m 4
int main()
{   int i,j;
    printf("%c",218);
    for(i=1;i<=n;i++)
                     printf("%c",196);
    printf("%c",191);
    for(i=1;i<=m;i++)
    {                 printf("\n%c",179);
                      for(j=1;j<n;j++)
                                       printf(" ");
                      printf(" %c",179);
    } 
    printf("\n%c",192);
    for(i=1;i<=n;i++)
                     printf("%c",196);
    printf("%c",217);
    getch();
    return(0);
}
you can change the dimensions by changing n and m.
 
0 Rakesh
 
 
Answer
printf("Rectangle");
 
0 Pramod
 
 
Answer
by using graphic header file
ex:
#include"graphic.h"
main()
{
rect(100,150,50,200);
}
 
0 Mohan
 
 
Answer
#include<graphics.h>
#include<conio.h>

void main()
{
    int gd=DETECT, gm;

    initgraph(&gd, &gm, "c:\\turboc3\\bgi " );
    rectangle(200,50,350,150); 

    getch();
    closegraph();
}
 
5 Srinivas.m
 
 
Answer
by using C compiler and keyboard.
 
0 Anjali
 
 
Answer
c 4 computer
so u can draw a rectangle using paint.
 
0 Bhargav
 
 
Answer
using initgraphics fn and rectangle(int left ,int top,int 
right,int bottom)
 
0 Aishwarya
 
 
Answer
rectangle(int,int,int,int);
and with few parameters 
and der's no necessity of using graphics.h 
n sorry if i am wrong. . .
 
0 Priyanka
 
 
Answer
void main()
{
int n=0,i=0;
printf("how many lines should rectangle can occupied");
scanf("%d",n);
printf("____________");
prinf("/n");
for(i=0;i<=n;i++)
{
printf("|           |");
printf("/n");
}
printf("____________")
}
 
0 Sabarinathan
 
 
Answer
rectangle(int,int,int,int);
 
0 Dinesh
 
 
Answer
Three ways as far as I read throught web and book
1 Using printf
2 Using rectangle function(int,int,int,int)
3 Using line function with appropriate coordinates

It's up to you.. first one doesn't require mode to be set 
graphic.
 
0 Ripesh
 
 
Answer
#include<graphics.h>
#include<conio.h>

void main()
{
    int gdrive=DETECT, gmode;

    initgraph(&gdrive, &gmode, "c:\\turboc3\\bgi " );
    rectangle(200,50,350,150); 

    getch();
    closegraph();
}
 
0 Ankit Limbachiya
 
 
Answer
use #include<graphic.h> in the header file

den accept the 2 co-ordinates of opposite vertices of the diagonal

and use rectangle(int x.topleft,int y.topleft , int x.bottomright,int y.bottomright);

here (x.topleft.y.topleft) are co-ordinates of top-left vertex
and (x.bottomright,y.bottomright) are co ordinates of bottom right vertex.
 
0 Ankita Vaidya
 
 
Answer
#include<grpahics.h>
void main()
{
 int gd=0,gm;
initgraph(&gd,&gm,"x:\\tc\\bgi");
rectangle(int,int,int,int);
}
 
0 Nithiya
 
 
Answer
rect(x1,y2,x2,y2)
 
0 Amaresh
 
 
Question   What is Debit Memo & Credit Memo in Payables? Rank Answer Posted By  
 Interview Question Submitted By :: Nihar
I also faced this Question!!   © ALL Interview .com
Answer
Debit Note:When a firm returns some goods to its 
suppliers,it prepares a debit note and sends it along wih 
goods returned.
Credit Note: Credit note nothing but Credit Memo. It is a 
document used to adjust or rectify errors made in a sales 
invoice, which has already been processed and sent to a 
customer.
 
3 Balamurali
 
 
Answer
In AP, both debit and  credit memo are perform same task.
Debit memo raised by supplier to us and credit memo raised
by us to supplier saying we are due to him. both will be
mention in -ve amount
 
4 Sita
 
 
Answer
In both Debit memo and credit memo, supplier's balance is 
reduced. Debit memo is issued by the Oraganisation to the 
supplier whereas Credit memo is issued by the supplier.
 
3 Venkat
 
 
Answer
Debit memo is raised by supplier to us when we return goods 
and Credit memo is raised by us towards supplier.There is 
also mixed memo which is combination of noth debit and 
credit memo
 
0 Gopi Kanth
 
 
Answer
In AP both Debit, credit memos accept -ve amounts only. The 
only differance is where it originates, weather at your end 
or at supplier's end.

If you create and send it to the supplier it is called 
Debit memo.
If you receive from the supplier and record it, it is 
called Credit memo.
 
3 Sudha
 
 
Answer
Debit Memo and Credit Memo functionality is same in Oracle 
Payables i.e it reduces the vendor balances
but Debit memo issues by Company asking vendor to reduce 
outstanding balance of the company where as credit memo 
issued by Vendor or Supplier.
 
0 Prashanth Kumar
 
 
Answer
In Oracle payables, both debit memo and credit memo are one 
and the same and are used to reduce the supplier's 
liability for the goods returned to him. The former will be 
prepared by us and the later will be prepared by the 
supplier and sent to us.
 
0 Harish
 
 
Answer
memo is a short note designating something to be 
done,According to ORACLE PAYABLES,

CREDIT MEMO-issued by the supplier.suppose there are errors 
in the invoice sent to the customer or there is aproblem 
with the shipment then this memo will be issued to decrease 
the amount specified int he original invoice sent to the 
customer.here,the supplier balance will reduce.

DEBIT MEMO-ISSUED BY THE CUSTOMER,if there is a defect in 
the goods,then along with the goods customer will send a 
debit memo to supplier,so here the supplier balance will 
reduce.


Thus in both cases the supplier balances will reduce.

let me give an example.if the invoice amount is 1000$,if 
supplier raises 100$ credit memo,then it is understood that 
due to some errors in invoice,he is sending a credit 
memo ,actual invoice amount is 900$.so the supplier total 
balances will come from 1000$ to 900$.

Now,let us take the example of debit memo,if there are any 
defect with goods supplied,say,for 100$ worth,then customer 
will send debit memo of 100$ to supplier.so in this case 
also the supplier balances come down from 1000$ to 900$.
 
5 Manoj Kumar
 
 
Answer
Debit Note: Debit note means, it is a note raised by the 
when goods returned by the debtor i.e. by the customer who 
bought goods from seller,
 
0 Usha
 
 
Answer
Debit memo is a document which is prepared by the customer 
to his suppliers to reduce in the amount due to over 
casting or damage of the goods or services. It allows 
negative balances only.

Credit memo is a document which is prepared by supplier and 
sent it to customer to reduce his due due to overcasting in 
the original invoice. It allows negative balances only.

The main difference between Debit Memo and Credit Memo is 
the origin of the document. If it is prepared by customer 
send it to supplier it is called as Debit memo and Supplier 
will accept it after confirmation. Supplier will not 
prepare Credit memo againt debit memo. And the document is 
prepared by supplier it is called as credit memo and 
customer will accept it but do not prepare debit memo 
against supplier credit memo.
 
0 G Prasad
 
 
Answer
The question is, "Will a Debit Note reduce Inventory during 
Posting". In JDE World application it will not because the 
post program do not inteface with Inventory. The answer is -
 a credit sales order will reduce inventory, create a 
credit invoice in AR, the reimburement program will create 
a Debit note in AP.
 
0 Roy Singh
 
 
Answer
Both Debit Memo and Credit Memo is possible in the Accounts
Payables.
You can raise Debit Memo in the following reasons to a Supplier
a. Materials Rejection
b. Reduce in the Purchase Charges such as Tax, Fright,
Carriage and so on
c. Quality of the material or delay in the supply of
materials caused to stop the production line

You can raise Credit Memo in the following reasons to a Supplier
a. Increase in the Purchase Charges
b. Late Payment or Cheque Bounce Charges
 
0 Avinash S M
 
 
Answer
Debit and credit memo both are negative in AP , both it 
reduces the purchaser’s liability and vendor’s/suppliers  
balance
The reasons for raising debit memo by 
purchaser                                                   
    Discount.
  . Over billing.(Good Returns )
  . Duplicate billing.
  . Wrong invoicing.
  . Over tax.
  . Over freight.

 :Above case we can issue debit memo or we can take Credit 
memo from Supplier ,


Supplier Debit Memo we will treate like standard invoice
 
5 Sanjeev Sharma
 
 
Answer
debit memo is issued when we want money from supplier and 
supplier issues credit memo.
debit memo for under payment and credit memo for over 
payment.
 
0 Sheetal
 
 
Answer
When goods are returned to vendor by the organisation,debit 
note is prepared by the organisation.When goods are 
returned by customer to the organisation, credit memo is 
prepared by the organisation.
 
0 Alok Kumar Jena
 
 
Answer
in simple way to say the ...

debit memo: increases the customer balannce..
credit memo: decreases the supplier balance..
 
0 Rahmath
 
 
Answer
DEBIT MEMO MEANS A DOC. WHERE WE RETURNS THE GOODS & ADJUST 
THE AMT WITH BILL IT IS IN CASE OF PURCHASE OF GOODS

CREDIT NOTE IS SAME BUT IT IS IN CASE OF SALE.
 
0 Parveen
 
 
Answer
Debit Note: Debit note means, it is a note raised by the 
when goods returned by the debtor i.e. by the customer who 
bought goods from seller.
 
0 Jharsa
 
 
Answer
Best answer found in this link
http://www.oraclechamps.com/oracle-functional-documents/261-oracle-financials-debit-momo-and-credit-memo.html
 
0 Oracle Champions
 
 
Answer
Debit memo raise by customer and credit memo is raised by 
by supplier in order to ractify the balance of supplier and 
customer
 
0 Mohammad Sarwar
 
 
Answer
debit note is a debit memo send to supplier by us
(they creditors)for a purpose to reduce the amount we owe; 
for the reason the product we received were damaged.
*purchases

credit note is a credit memo sent to customer by us 
(they debtors) for a purpose to reduce the amount they owe; 
for the reason the product they received were damaged.
*sales
 
0 Mohd Shahreza Izzwan B. Mohama
 
 
Answer
credit memo means credit note and debit memo is debit note
 
5 Mahamood
 
 
Answer
What is major difference between Bank and Bank Account?
Bank is the place which we submit our cash or check and 
Bank Account in the code of items or person.
 
0 Mohammad Sarwar
 
 
Answer
Debit Memo prapared by supplier and cridet Memo raised by 
Organiztion or firm to supplier.
 
0 Mohammad Sarwar
 
 
Answer
debit memo= issued by the supplier to show the amount it 
owes the customer after noticing it short-change the latter

credit memo= from the customer to the supplier
 
0 Che Wamucho
 
 
Answer
Debit memo and credit memo are used in payables to reduce 
the supplier balance when ever goods are returned.

Credit Memo is send by the supplier to reduce his 
liabilites.
Debit Memo is created by the purchasing organization when 
ever supplier does not send credit memo for purchases 
returns.
Debit memo and Credit memo matched to Purchased invoice 
(standard invoice)
 
0 Babitha
 
 
Question   Difference between primary key and unique key ? Rank Answer Posted By  
 Interview Question Submitted By :: Neelam
I also faced this Question!!   © ALL Interview .com
Answer
The column holding the primary key constraint cannot accept 
null values.whereas colum holding the unique constraint can 
accept null values assume that t3 is a table with two 
columns t1 having primary key constraint and t2 having 
unique constraint if u try to insert null into t2 it will 
accept that values whereas column t1 will not accept null
 
3 Umapathy.r
 
 
Answer
Primary key doesnot allow null value but unique key allows 
null value. We can declare only one primary key in a table 
but a table can have multiple unique key(column assign).
 
4 Niranjan Dhungia
 
 
Answer
First difference is that primary key doesn't accept null 
values whereas unique accepts one or multiple.
second difference is that Clustered index is created on 
Primary key constraint and non clustered unique indexes is 
created on Unique key constraint.
 
2 Prashant T.
 
 
Answer
Primery Key = (Unique key - NULL values) 

One table may have more than one Unique Key Constraint
columns, but should have only one Primary Key Constraint
column. 

Any comment? please shoot a mail.
 
3 Satya
 
 
Answer
we can't insert a NULL value into to coloumn holding 
primary key constrain.
where as we can insert a NULL value to a unique key feild.
Remember, both keys are used to identify the 
rows/tuple/entry of the table uniquely.
so, only once u can enter a NULL value into the unique key 
feild.
 
4 Austin Johnson
 
 
Answer
the basic difference is that primary key can not have null 
value whereas Unique key can have null values.two null 
value are not same.One table may have more than one Unique 
Key Constraint
columns, but should have only one Primary Key Constraint
column.
 
2 Sunil Upadhyay
 
 
Answer
7. Primary Key doesnt allow the Null Values. where as in 
Unique accept the Null values.
One table may have more than one Unique Key Constraint.
But it sholud have only one Primary Key Constraint column.
 
2 Ark Chowdary
 
 
Answer
* Only one primary key is allowed per table (any number of 
unique keys are allowed).
* Primary key columns automatically become NOT NULL (unique 
keys can contain nulls).
* UNIQUE and DISTINCT are synonymous in a SELECT list.
 
4 Jeyasree
 
 
Answer
Each table having only one PRIMARY KEY.And my contain many
UNIQUE KEYS.
PRIMARY KEY is identity of each row. UNIQUE KEY also
identity of each row.
BOTH keys will not contain repeated value.
BUT UNIQUE KEY will contain NULL value but PRIMAY key will
not contain NULL value.
 
3 Pralhad
 
 
Answer
Primary key not accepts to null values in database, but
uniqe key accepts to the null values in database.
 
5 Anil Singh
 
 
Answer
the no of primary key in a table is one but the no of 
unique is more then one
 
0 Saurabh
 
 
Answer
464565
 
0 Gfgfgf
 
 
Answer
Unique key                    Primary key
1. Can have null value    1. Can not have null value
2.Table can have multiple 2. Table Can have multiple unique
Unique keys                 keys
3Single column at a time  3. May be combination of one  or 
                        or more columns
 
0 Vitthal Parkar
 
 
Answer
there is only one primary key for one table;
it can not acept null values;
any no uniquefor a table;
it can accept null values;
which the rows are unique value;
 
2 Guna
 
 
Answer
primary key will not allow null values whereas unique key 
will allow null values.we have only one primary key per 
table,but we can have more than one unique key per table
 
1 Sreesakthi
 
 
Answer
Primary key creates Clustered Index.
Unique key creates non-clustered Index
 
0 Dj
 
 
Answer
Primary Key 
1. Not Null
2. One primary key can be defined at on table

Unique Key
1. May be Null
2. one or more then 1, can be implemented
 
0 Satendra Dixit
 
 
Answer
Unique key                    Primary key
1. Can have null value    1. Can not have null value
2.Table can have multiple 2. Table Can have multiple unique
Unique keys                 keys
3Single column at a time  3. May be combination of one  or 
                        or more columns
 
0 Kundn
 
 
Answer
column having primary key constraint should not contain 
null values.

column having unique key constraint can contain null values.


Unique as well as primary key constraint can be 
defined/applyed on more than one column.
EX.
ADD constraint uc_person UNIQUE(P_Id,Lastname)
ADD constraint uc_person PRIMARY KEY(P_Id,Lastname)

But whle creating table we can write unique key word 
multiple time and primary key wprd only once.Because table 
can have only one primary key and can have miltiple unique 
key.But both can apply on more than one column.
and
 
0 Bhushan Tatar
 
 
Answer
primary key create index it means its value inserted in
sequence but in unique, we insert data in any order
 
0 Pankaj Kumar Tiwari
 
 
Answer
primary key has no null values whereas unique accepts null 
values and in a table only one primary key is declared 
whereas unique key is multiple in a table.
 
0 Niraj Pratap Singh
 
 
Answer
Primary key contain non repetitive value and not null 
value,and primary key is created on clustered index.In the 
table their should be one primary key column.


Unique key contain non repetitive value but can contain 
only one null value in the column.And unique key is created 
on non clustered index.
 
0 Mohan Singh
 
 
Answer
1)unique key can be null but primariy key cant be null.
2)primariy key can be refrenced to other table as FK.
3)we can have multiple unique key in a table but PK is one 
and only one.
4)PK in itself is unique key.
5)a table can have more then one unique key column but a 
table can have only one primary key column.
6)primary key creates clustered index but unique key 
creates non clustered index.
 
0 Rinu
 
 
Answer
primary key and unique key both can be referenced to other 
table as foreign key. please check this error message

ORA-02270: no matching unique or primary key for this 
column-list
 
0 Ajoy
 
 
Answer
1. Primary key does not allow Nill value whereas Unique key 
allows Null values.

2. There can more than one Unique key for a table however 
there is only one primary key for ant tanle.

2. Whenever a primary key is assigned by default a 
Clustered Index is created whereas When a Unique key is 
created a Non Index clustered index is created...
 
0 Ela Tiku
 
 
Answer
thanks for ans.
 
0 M
 
 
Answer
Primary Key:
Primary key will create column data uniqueness in the table.
Primary key will create clustered index by default
Only one Primay key can be created for a table
Multiple columns can be consolidated to form a single 
primary key
It wont allow null values.

Unique Key :

Unique key constraint will provide you a constraint like 
the column values should retain uniqueness.
It will allow null value in the column.
It will create non-clustered index by default
Any number of unique constraints can be added to a table.
 
4 Dpkar
 
 
Answer
Primary key's main role is to make field as unique and 
relates to other sub table. Whereas unique is role only to 
keep unique value in that field.
 
0 Vijay
 
 
Answer
I am Sripathi Venkata Ramesh from Gudivada and the answer 
is mentioned below

Primary key: A Primary key is a column or group of columns 
used to uniquely identify each row in a table like 
It defines the column as a Mandatory column.
The data held across the column must be unique.
By default it creates clustered index.
It does not allow null values and duplicate values


Unique key: It also for the record uniqueness.
It allows only one null value
By default it creates non clustered index
 
0 Sripathi Venkata Ramesh
 
 
Answer
primary key does not null,but unique key also null.
 
0 Sarvan Yadav
 
 
Answer
are yar 
primary key that does not accept null value
and in table only one exist.
but the case of uniue key that accept null value one or more
and many unique key exist in a single table
 
0 Avesh Upadhyay,iims
 
 
Answer
Primary key contain non repetitive value and not null 
value,and primary key is created on clustered index.In the 
table their should be one primary key column.
 
0 Rajkumar Tiwari
 
 
Answer
Primary Key cannot contain null values
Each table has one and only one Primary Key
Primary Key is used to reference as Foreign key while 
performing table joins
Clustered index is created on Primary Key

Unique Key can contain null value
A table can have any numberof unique keys
Non-clustered index is created on unique key columns
 
0 Sandhya
 
 
Answer
Primary Key : Is an identity of a row, Only one primary key per table, No duplicate values allowed, & No NULL values are allowed. 

Unique Key : Its values are unique, It can contain any number of NULL values unless combination is going to be unique.
 
0 Anand B
 
 
Answer
column having primary key constraint should not contain 
null values.

column having unique key constraint can contain null values.
 
0 Sonali.s
 
 
Answer
-The column holding the primary key constraint cannot accept 
null values.whereas colum holding the unique constraint can 
accept null values.
-We can declare only one primary key in a table 
but a table can have multiple unique key
-Clustered index is created on Primary key constraint and 
non clustered unique indexes is created on Unique key constraint.
-Primary key columns automatically become NOT NULL (unique 
keys can contain nulls).
 
0 Mohammad Ali
 
 
Answer
Primary key does not allow null values whereas in UNIQUE constraint we can have 1 null value means for that column one null value is allowed.
 
0 Himanshu Porwal
 
 
Answer
primary key not allows null values, but unique key allows null values. only one primary is possible in one table, but multiple unique keys are possible in a table. Each unique key accepts only one null field. Both are used to prevent repeated entry of values.
 
0 Praveen
 
 
Answer
uniqe key may contain null values but primary key can not take the null values.
 
5 Suman Chatterjee.
 
 
Answer
The primary key cannot be accept the null values.The unique key can accept null values. assume that you have a two 
columns column1 having primary key constraint and column2 having unique constraint if u try to insert null into column2 it will accept that values whereas column1 will not accept the null values.


      THANK YOU.ALL THE BEST...............
 
0 Mareeswaran-jeyakani
 
 
Answer
The basic differences between Primary Key and Unique key are as follows.

1) By default Primary Key will generate Clustured Index
whereas Unique Key will Generate Non-Clustured Index.

2) Primary Key is a combination of Unique and NOT NULL Constraints so it can’t
have duplicate values or any NUll
Whereas for Oracle UNIQUE Key can have any number of NULL whereas for SQL
Server It can have only one NULL

3) A table can have only one PK but It can have any number of UNIQUE Key.
 
0 Priyranjan Das
 
 
Answer
In the Table a primary key constraint column cannot holding
the null values.whereas unique constraint colum can  holding
the  null values.
Ex.|--------------------|
   | ID(P)   |  Name(U) |   #ID(P)  ->It's a Primary Key
   |--------------------|     * Its a Not Null
   |  1      | Hemendra |     * A table Contain 1 Primary 
   |  2      | Neeraj   |       Key.
   |  3      | PremJe   |   #Name(U)->It's a Unique Key
   |NotNull  |canbe Null|      * Its can contain Null Value
   |--------------------|      * A table Contain  more      
                                 than 1 unique Key.        
              
    Please Check the Radio Button..........
******************Gud Luck********************
 
5 Hemendra Singh Chaudhary
 
 
Answer
Primary key don't have any null value, each table have only
one primary key. Not support duplicate value.

Unique key is uniquely identify, more then one unique key
allow in table.

Here the main different is what primary key do not have any
null value where unique key have only one null value.

Ex: here t1 is the name of table which have two field id and
name. here id is identify as a unique key then unique key's
null value look like under bellow:

1	chintan
NULL	komal
2	ck
NULL	NULL
 
0 Chintan Desai
 
 
Answer
primary key not accepts null value and 
not allows duplicate values.
but Unique key not allows duplicate values
but it accepts ONLY ONE NULL VALUE.

only one primary key allowed per table
we can create multiple unique keys 
on the table

By Default, Primary key creates Clustered Index and Unique key Creates Non Clustered Index
 
0 Vaithianathan
 
 
Answer
Primary key: Do not allow the 
duplicates and null values.
Unique key : Do not accept the 
duplicates,but allow null value
 
0 Boomiraj.p
 
 
Answer
primary key is unique define in a table, it means if u
declare primary key value is not allows duplicate and null.

unique key allows repeats' a value and null.
 
0 Yogesh Kumar
 
 
Answer
1. PRIMARY KEY & UNIQUE KEY both uniquely identity of each 
row in a table.
2. BOTH keys will not contain repeated value.
3. One table may have more than one Unique Key Constraint But 
it should have only one Primary Key Constraint column.
4. BUT UNIQUE KEY will contain NULL value but PRIMAY key will 
not contain NULL value.
 
0 Deen Dayal Sharma
 
 
Answer
The unique column constraints permits multiple entries of
null in the column. these null values are clubbed at top of
column in order they were entered into table. this is
essential difference .

Table have more than 1 unique key which is not possible in
primary key
 
0 Anuradha
 
 
Answer
Primary key doesnot allow null value but unique key allows 
null value. We can declare only one primary key in a table 
but a table can have multiple unique key(column assign).
 
0 Chauhan Rakesh Botad
 
 
Answer
--->We Define only one PK per table but it should have one
or more UK.
--->PK does not contain null but UK contains null.
 
0 Saga
 
 
Answer
One table may have more than one Unique Key Constraint
columns, but should have only one Primary Key Constraint
column.
 
0 Pawan Mishra
 
 
Answer
There is only one primary key in a table but multiple unique
key.
 
0 Ranjeet Kumar
 
 
Answer
PRIMARY KEY is identity of each row. UNIQUE KEY also
identity of each row.
PRIMARY KEY not accepts null values but unique can accept null.

but the core different between primary key and unique is we use primary key to link tow tables with each other but we can not use unique key to do this.
 
0 Ibrahim
 
 
Answer
the difference is only primary key does not accept null values
while unique key accept null value
remember that unique key holds null only once
 
0 Shakeel Shikari
 
 
Answer
Primary Key:
    * Primary Key can not contain null value
    * Clustured index is created in Primary key.
    * Primary Key allows Each row in a table to uniquely
identified and insures that no applicable row exists.

Unique Key:

    * Unique Key can contain null value.
    * More than one Unique key in a table can be declared.
    * Non-clustered index is created in unique key.
 
0 Ankit Kumar Singh
 
 
Answer
When we applied primary key constraint upon a column of a table internally oracle create a cluster index.In case of unique constraint,oracle create a non-cluster index.
In a table or entity one primary key and one or more than one
unique key can be applied.
We can't insert duplicate value or null value to primary key
column where as null value can insert into unique key column.
 
0 Susil Kumar Rout
 
 
Answer
1. There can be more than one unique key in a row or table
but there can be only one primary key in a row or table.

2. Primary key does not accept NULL values but Unique key
accepts even NULL values.
 
0 Nithin
 
 
Answer
Primary key doesnot allow null value but unique key allows 
null value.
 
0 Pandiyan
 
 
Answer
Primary key creates Clustered Index.
Unique key creates non-clustered Index.

the no of primary key in a table is one but the no of 
unique is more then one

there is only one primary key for one table;
it can not acept null values;
any no uniquefor a table;
it can accept null values;
which the rows are unique value;
 
0 Chetan Sharma
 
 
Answer
Primary key Accept only one Null Value...But a Unique key Accept one or More Null value........

 create table #foo(id varchar(5)primary key,name varchar(10));

insert into #foo('','Your name');

 ---------->> see the result.....
 
0 Arpit Sachan
 
 
Answer
In any table there can be one and only one primary key
(composite priamry key can have more than 1 column but 
together conside one key only) but more than one unique 
keys.

Primary key cannot accecpt null value.unique key accecpts 
one or more than one null values.

primary key uniquly identifies the table but unique key is 
used for uniquly identified of table as it contain one or 
more than onee null.

Clustered index is created on 
Primary key constraint and non clustered unique indexes is 
created on Unique key constraint.
 
0 Omkar
 
 
Answer
Primary key not accepts to null values in database, but
uniqe key accepts to the null values in database.

Each table having only one PRIMARY KEY.And my contain many
UNIQUE KEYS.
PRIMARY KEY is identity of each row. UNIQUE KEY also
identity of each row.
BOTH keys will not contain repeated value.
BUT UNIQUE KEY will contain NULL value but PRIMAY key will
not contain NULL value.
 
0 Lucky
 
 
Answer
PRIMARY KEY 
1)TABLE CAN NOT HAVE MORE THAN ONE PRIMARY KEY.
2)PK DOES NOT ALLOW NULL VALUES.
UNIQUE KEY
1)TABLES CAN HAVE MORE THAN ONE UNIQUE KEY.
2)UNIQUE KEY ALLOWS NULL VALUES.
 
0 Mudigouda Patil
 
 
Answer
Both primary key and unique enforce uniqueness of the 
column on which they are defined. But by default primary 
key creates a clustered index on the column, where are 
unique creates a non-clustered index by default. Another 
major difference is that, primary key does not allow NULLs, 
but unique key allows only one NULL only.
 
0 Pramod Paunikar
 
 
Answer
Primery Key is allows the null value but unique wont accept 
the null values in database ....
 
0 Madhusudan Reddy Paila
 
 
Answer
Both primary key and unique enforce uniqueness of the column
on which they are defined. But by default primary key
creates a clustered index on the column, where are unique
creates a nonclustered index by default. Another major
difference is that, primary key doesn't allow NULLs, but
unique key allows one NULL only.
 
0 Manoj Routh
 
 
Answer
Primary key does not allow null value but unique key allows 
null value. suppose tableA two column : columnB & columnC .
where coulmnB is primary key & columnC is unique key.
If we insert null value in columnB.It will not accept
columnB but columnC
 
0 Sikander
 
 
Answer
There is two difference between them.

1. The not null constraint is by default added to primary
key, it means, primary key attribute cannot accept null
values, whereas, the attribute declared as unique can accept
null values. It is the major difference between the two.

2. Secondly, we can have only one primary key in a relation,
whereas, multiple attributes can be declared unique at the
same time.
 
0 Tom
 
 
Answer
Primary Key:
It wont accept NULL values.
It wont accept Duplication.
Unique Key:
It accepts NULL values.
Foreign Key:
It accepts NULL values.
It accepts Duplication.
Main point is, A Foreign key denotes a Primary key in the another table.
 
0 Dinesh
 
 
Answer
1. Primary key accepts a value only single time not more then one time means it doesn't allow repetition same as for unique key.
2. Primary key don't allow null values ,but unique key allow null values.
 
0 Chandra Bhan Kumhar
 
 
Answer
There is only two Point:
1. The not null constraint is by default added to primary key, it means, primary key attribute cannot accept null values, whereas, the attribute declared as unique can accept null values. It is the major difference between the two.
2. Secondly, we can have only one primary key in a relation, whereas, multiple attributes can be declared unique at the same time.
 
0 Alok
 
 
Answer
primary key doesnt allow duplicates and null values
unique key allows null value only once
and more over 
when you applying primary key  by default clustered index is created on that table
when u applying unique key non clustered index is created on that table.
so  primary key can be allowed only once(1) and unique u can apply more
than one on a single table(249)
 
0 Yjreddy
 
 
Answer
In SQL both primary key and unique enforce uniqueness of 
the column on which they are defined. But by default 
primary key creates a clustered index on the column, where 
are unique creates a non-clustered index by default. 
Another major difference is that, primary key doesn't allow 
NULLs, but unique key allows one NULL only. 

Unique Key: Identify the row by uniquely, means if you are 
inserting a records into the table suppose you already 
inserted a record with ID 101 and another record you are 
inserting with the same ID then it will give an error
(unique key voilation).

Prmary Key:Once you define a primay key on a particular 
column then a column become a mandatory field.That means 
you need to insert something on it, you can not leave as a 
blank otherwise it will give an error as primary key 
voilation.
 
0 Madhumita Majhi
 
 
Answer
1.Primary key can not have null.Instead of it unique can have null at lest single time null.
2 In a table only one primary key exist.Unique can be multiple in table.
 
0 Rakesh Dwivedi
 
 
Answer
Primary Key               Vs    Unique key
1.Each table having             1. contain many UNIQUE KEYS.
  only one PRIMARY KEY.                                      
2.Primary key not accepts       2.Unique Key accepts null 
  null values                     values
 
0 Rubiya George
 
 
Answer
1) Primary key can not accept null values, but unique can 
accept null values.

2) only one primary key have in a table but max 249 unique 
in a table
 
0 Laxman K
 
 
Answer
unique key is a key that uniquely defines the characteristics of each row whereas primary key consists of characteristics that cannot collectively be duplicated by any other row.primary key will not allow null values whereas unique key will allow nulls.
 
0 Jason James John
 
 
 
Back to Questions Page
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright © 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com