ALLInterview.com :: Home Page KalAajKal.com
 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                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
What is the difference between a local and a global variable?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between a local and a global variable?
Answer
# 1
Local Variable :
               The scope or lifetime of the local variable 
is with in a block or procedure..
Eg: DECLARE @Variable1

Global Variable :
                The scope or lifetime of the global 
variable throughout the execution of the program..
Eg: DECLARE @@Variable1
 
Is This Answer Correct ?    18 Yes 5 No
Thiyagaraj.ramaswamy
 
  Re: What is the difference between a local and a global variable?
Answer
# 2
Local Variables are declared within the function main.

  main()
    {
       int a,b,c;(local variable declaration)

     }
Global variables are declared outside the function main.

int FACT(int);
main()
{
   Local variable declaration;
}
 
Is This Answer Correct ?    19 Yes 2 No
Rahul
 
 
 
  Re: What is the difference between a local and a global variable?
Answer
# 3
A global variable can be accessed by all functions. It is
initialized at the beginning of the program and is deleted
when the program shuts down. A local variable is isolated in
its function.
 
Is This Answer Correct ?    3 Yes 0 No
L.pandiyan
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
How to write a script for upate the data in prod , i have 50000 row are there TCS2
How do you troubleshoot SQL Server if its running very slow?  2
what purpose does OPENXML clause have in sql server stored procedure?  1
how insert selected column only ? Robert-Half2
How to tune a stored procedure?  5
What is the advantage of specifying WITH GRANT OPTION in the GRANT command?  2
As a part of your job, what are the DBCC commands that you commonly use for database maintenance? HCL1
What is mean by "fill factor" ? and what is mean by "Index "in sql? Logica-CMG1
Explain the basic concepts of SQL server architecture?  2
What types of integrity are enforced by a foreign-key constraint  1
How to find the date and time of last updated table?  2
wat will be the sql query to extract only last 3 records from table supose table hving thousands for records  16
Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?  2
What is database replicaion? What are the different types of replication you can set up in SQL Server?  2
What is data integrity? Explain constraints? Thinksoft1
what is the importence of the trigger in sqlserver2000? ATI1
I Have Employee table having column name as ID,SALARY how to get second max salary from employee table with id ex ID SALARY 1 20000 7 37000 2 5000  11
Hello all, I have data like :- year amt 2004 10 2005 20 2006 30 Now i want output as:- 2004 2005 2006 10 30 60 but i have to use here group by on year.So, i need a single query within that i can find.  2
Is it possible to allow NULL values in foreign key? I s it possible to use different constraints for the same column in the table (i.e) (id int NOT NULL,UNIQUEUE)  1
What is the purpose of UPDATE STATISTICS?  1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com