Tuesday, 24 November 2009

New sql question

How many levels of Nesting a stored Procedure we can Have? 32
How can we fetch the last Identity Column Inserted in the Table @@IDENTITY,SCOPE_IDENTITY(), IDENT_CURRENT(‘DataTable’)

What is maximum number of subqueries we can write in query in SQL Server 32
What is maximum number of parameters we can add in a stored procedure 2100
Which of the following function will generate a new guid/uniqueidentifier in SQL Server
NEWID()
Which of the following function will return last value inserted into the IDENTITY column of a table @@IDENTITY
How many NonClustered Indexes be able to Created on a Table?
Which index will be created on a table by default using unique key? Non-Clustered Index

What's the maximum value can an INT data type hold? 2,147,483,647
How will you throw exception from stored procedure? @@raiseerror

You can view the nest level in a stored procedure by using the following command: SELECT @@NESTLEVEL

In SQL Server 2000, the page size is ? 8kb

We can Get List of Triggers :
select * from Sys.Objects where Type='tr'
SELECT *FROM sys.procedures;
SELECT * FROM sys.Tables

Cursor attribute is belonged to the language? pl/sql