1.what is the purpose of using alias name in sql server?
with certain example?

2.what is cursor?will u plz explain me in detail with
certain example?

Answers were Sorted based on User's Feedback



1.what is the purpose of using alias name in sql server? with certain example? 2.what is cursor?..

Answer / sujit sarkar

The main purpose of alias is we can define one object (like
table,column..) from another object which is used in sql
statement.
Suppose you need average salary and salary

then you can write

Select salary/12 as 'average salary' from salary

Is This Answer Correct ?    13 Yes 1 No

1.what is the purpose of using alias name in sql server? with certain example? 2.what is cursor?..

Answer / lekhrajdeshmukh

Cursor:- Cursor is special data type of mssql server.
Cursor is mainly used for extracting the row by row data
from tables.
cursor is the only data type that can not be used in table.
Cursor is mainly used in stored procedure and when we have
to use cursor in SP need to perform the following steps:-
1)declaring a cursor.
2)Open a Cursor
3) fetching the cursor
4)close the cursor.

Is This Answer Correct ?    9 Yes 0 No

1.what is the purpose of using alias name in sql server? with certain example? 2.what is cursor?..

Answer / lekhrajdeshmukh

Cursor:- Cursor is special data type of mssql server.
Cursor is mainly used for extracting the row by row data
from tables.
cursor is the only data type that can not be used in table.
Cursor is mainly used in stored procedure and when we have
to use cursor in SP need to perform the following steps:-
1)declaring a cursor.
2)Open a Cursor
4)close the cursor.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SQL Server Interview Questions

how to write test cases for testing databases,especially for testing and writing test cases for stored procedures.any real time database testers.please answer me.

0 Answers  


What are the authentication modes in sql server? How can it be changed?

0 Answers  


Rate yourself in .NET and SQL ?

1 Answers   Cognizant, HCL, SunGard,


Please give me the SP for the below scenario. I have two tables named Table1 and Table2...I need to fetch record by record from Table1 and insert the record in to table2 where the value in the sno column of the table1 is even number.

4 Answers   Value Labs,


After the SQL installation what are the jobs will you configure?

1 Answers   G7 CR Technologies, IBM, Satyam,






How to get the query of a table in sql server?

0 Answers  


Please tell me some knowledge about Clustering and how to add clustering?

1 Answers  


What are indexes in ms sql server?

0 Answers  


tell me the disaster recovery plan

0 Answers   Microsoft,


How to apply cascading referential integrity in place of triggers?

0 Answers  


What is user-defined function? Explain its types i.e. Scalar and inline table value user-defined function?

0 Answers  


What are the advantages of using cte?

0 Answers  


Categories