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

check, not null,unique

2 Answers   IBM,


What is an index in a database?

0 Answers  


Tell me what is the significance of null value and why should we avoid permitting null values?

0 Answers  


Following are some of the question related to below mentioned query? select e1.salary from employee3 e1 where 2= ( select count(distinct(e2.salary)) from employee3 e2 where e2.salary>=e1.salary ) 1) What the query returns? 2) How it works? - Detail explanation (what the sub query does, why it is (where 2=)....etc...Please?

5 Answers  


1.how to find the dead lock in sql server? 2.How to fine the memory leaks in sql server? 3.suppose transaction log file increasing what action will take ?

0 Answers  






How will you go about resolving deadlocks?

0 Answers  


What will you do If the low Performance occurs?

2 Answers  


What is the difference between sdf and mdf?

0 Answers  


What is the difference between a Application Server and a Database

3 Answers   Oracle,


Explain the stored procedure?

0 Answers  


Can you create UNIQUE and PRIMARY KEY constraints on computed columns in SQL Server 2000?

3 Answers   Infosys,


What is a system database and what is a user database?

0 Answers  


Categories