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
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 |
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 |
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 |
if 3 duplicate records in a table,i want to delete 2 duplicate records by keeping 1 as it is,how?
How do I save a stored procedure in sql server?
How many types of functions are there in sql server?
How do I make a resultset scrollable?
Can we use trigger new in before insert?
What is amo? : sql server analysis services, ssas
Explain unique key in sql server?
What is difference between TRUNCATE and DELETE statement
Why and when do stored procedure recompile?
What stored by the msdb?
What is a materialized view?
What is an entity-relationship diagram (erd)?