Posts

Showing posts with the label SQL Server

3-6 yr Experience Interview Questions in .Net Technologies

3-6 yr Experience Interview Questions in .Net Technologies Hai Friends, Below I am posting the questions and answers for the short questions for 3-6 years experience guys. These questions will be helpful for those who are either preparing for the interview or attending the interviews. This will also be helpful for the last minute preparation in quickest way. If anyone has better answers, please reply to this post and I will include the better answer to the post as it will be helpful for all of us. CLR and C# 1. Types of Authentication IIS. A. Authentication is the process which helps web server(IIS) to check and confirm the identity of the client who request to access the website. Types of Authentication: a. Http Authentication: Basic Authentication, Digest Authentication b. Integrated Windows Authentication: NTLM(Network Lan Manager), Kerberos c. Client Certificates Access d. Anonymous and UnAuthenticated Access e. Logon-Redirection based: Form Authentication(IIS 7.0) ...

Difference between Delete and Truncate in sql

DELETE 1. DELETE is a DML Command. 2. DELETE statement is executed using a row lock, each row in the table is locked for deletion. 3. We can specify filters in where clause 4. It deletes specified data if where condition exists. 5. Delete activates a trigger because the operation are logged individually. 6. Slower than truncate because, it keeps logs. 7. Rollback is possible. TRUNCATE 1. TRUNCATE is a DDL command. 2. TRUNCATE TABLE always locks the table and page but not each row. 3. Cannot use Where Condition. 4. It Removes all the data. 5. TRUNCATE TABLE cannot activate a trigger because the operation does not log individual row deletions. 6. Faster in performance wise, because it doesn't keep any logs. 7. Rollback is not possible. DELETE and TRUNCATE both can be rolled back when used with TRANSACTION. If Transaction is done, means COMMITED, then we can not rollback TRUNCATE command, but we can still rollback DELETE command from LOG files, as DELETE write records them in Log fil...

RAISERROR In SQL Server

Image
SQL Server has its own error handling mechanism, where  @@Error is used to trap the errors and we can get the Error Message for that error.  RAISERROR allows developers to produce our own error message. Using RAISERROR , we can throw our own error message while running our Query or Stored procedure.  RAISERROR is used to return messages back to applications using the same format as a system error or warning message generated by the  SQL Server Database Engine . We can also set our own severity for each and every individual message. To conclude the summary: It allows developers to generate their own messages It returns the same message format that is generated by SQL Server Database Engine We can set our own level of Severity for messages It can be associated with Query and stored procedure General Syntax for using RAISERROR Below is the general syntax for  RAISERROR : Hide     Copy Code RAISERROR ( { Message ID | Message Text } ...