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 create user defined functions with parameters?

0 Answers  


What is sql injection? How to protect against sql injection attack?

0 Answers  


What is the difference between writing data to mirrored drives versus raid5 drives

0 Answers  


when you create a database how is it stored? : Sql server database administration

0 Answers  


What are relationships and mention different types of relationships in the dbms

0 Answers  


How to add additional conditions in SQL?

0 Answers   Amdocs,


What is difference between getdate and sysdatetime in sql server 2008?

0 Answers  


Define cross join in sql server joins?

0 Answers  


Which index created when Create Index on table(col), Why

2 Answers   CGI,


What is the function of sql server agent windows service?

0 Answers  


write the query for find the top 2 highest salary in sql server

36 Answers   Cranes, Jayanti Software, Medi Assist, Rmax, TCS,


Find first and last day of current month in sql server

0 Answers  


Categories