Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
SQL Server Difference FAQs-1

SQL Server Difference FAQs-1

Ratings: (0)|Views: 515|Likes:
Published by Umar Ali
This provides a list of SQL Server FAQs-1 which are of "Difference between" kind
This provides a list of SQL Server FAQs-1 which are of "Difference between" kind

More info:

Published by: Umar Ali on Mar 19, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

10/20/2010

pdf

text

original

 
1)What are the Differences between TRUNCATE and Delete?S.NoTruncateDelete
1Truncate is fasterDelete is comparatively slower2Removes all rows from atableCan remove specific rows withWhere clause3Is DDL CommandIs DML Command4Resets identity of the tableDoes not reset identity of thetable5Removes the data bydeallocating the data pagesand logs the deallocation.Removes one row at a time andrecords an entry in thetransaction log for each deletedrow.6Cannot be rolled backCan be rolled back2)
What are the differences between Primary key and Uniquekey?S.NoPrimary KeyUnique Key
1Creates Clustered indexCreates Non-Clustered index2Null values are not allowedAllows only one null value3)
What are the Differences between Clustered Indexes and Non-Clustered Indexes?S.NoClustered IndexesNon-Clustered Indexes
1It reorders the physicalstorage of records in thetableIt sorts and maintain a separatestorage2There can be only oneClustered index per tableMore than one3The leaf nodes contain dataThe leaf node contains pointer todata
4)What are the differences between Stored Procedures and UserDefined Functions?S.NoStored ProceduresUser Defined Functions
1Stored Procedure cannot beused in a Select statementUser Defined Function can beused in a Select statement
 
2Stored procedure supportsDeferred Name ResolutionUser Defined Function does notsupport Deferred NameResolution3Stored Procedures aregenerally used forperforming Business LogicUser Defined Functions aregenerally used for Computations4Stored Procedure need notreturn a valueUser Defined Functions shouldreturn a value5Stored Procedures can returnany datatypeUser Defined Functions cannotreturn Image6Stored Procedures canaccept more number of inputparameters than UserDefined Functions. StoredProcedures can have upto21000 input parametersUser Defined Functions acceptlesser number of inputparameters than StoredProcedures. UDF can have upto1023 input parameters7Stored Procedures can use Temporary Tables Temporary Tables cannot beused in a User Defined Function8Stored Procedures canexecute Dynamic SQLUser Defined Functions cannotexecute Dynamic SQL9Stored Procedure supportserror handlingUser Defined Function does notsupport error handling.RAISEERROR or @@ERROR arenot allowed in UDFs10Non-deterministic functionscan be used in StoredProcedures.Non-deterministic functionscannot be used in User DefinedFunctions (UDFs). For example,GETDATE() cannot be used inUser Defined Functions(UDFs)
5)What are the differences between Where and Having clauses?S.NoWhere clauseHaving clause
1It applies to individual rowsIt applies to a group as a whole2It selects rows beforegroupingIt selects rows after grouping3It cannot contain aggregatefunctionsIt can contain aggregatefunctions4It can be used in select,delete ,insert etc.It is used only in select clause
6)What are the differences between Union and UnionAll?S.NoUnionUnionAll
1This is used to eliminateduplicate rowsIt will not eliminate duplicaterows

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->