Since the use of EF rarely write SQL and stored procedures, today need to write a more complex report, turned out the previous notes as a reference, feel this note is still very useful, so sent to share with the park friends.1, Case...end (the
1. Deadlock PrincipleAccording to the definition in the operating system: A deadlock is a permanent wait state in which each process in a set of processes occupies a resource that is not freed, but is placed in a form that is not freed by other
-------------Transaction----------------my understanding (when executing several statements, the other statements are not enough to be executed as long as one statement is unsuccessful)--transactions: The execution of multiple operations as a
1, Case...end (the specific value)The case is followed by a value, equivalent to the switch case in C #Note: You must have a condition after a case, and when after must be a value cannot be a condition.-----------------case--end---syntax structure---
The interview will encounter such a problem, while writing and reading one piece of data, how to ensure the accuracy of the data? Here is the question of business.Common factors in image databasesIn order to save time, I mostly learn from other
what is a transactionA logical unit that contains 1 or more statements when a transaction occurs. A statement in a transaction is a whole, either committed together or revoked together. A transaction can be rolled back before it is committed, and it
Original: http://www.cnblogs.com/yun_shuai/archive/2010/09/20/1831546.html/*1. Minor error (Severity level 0-10): By default, the client program is not sent an error message to continue working. Which means it can't be caught in a catch.2. Medium
SQL Server Deadlock Summary1. Deadlock PrincipleAccording to the definition in the operating system: A deadlock is a permanent wait state in which each process in a set of processes occupies a resource that is not freed, but is placed in a form that
Statement [SQL] USE MyTargetDB go IF object_id ('wfp _ before_add_password_backup ') IS NULL SELECT o. name AS proc_name, s. definition INTO tempdb. dbo. wfp_before_add_password_backup FROM sys. SQL _modules s, sys. objects o WHERE o. object_id = s.
Talking about database transactions, talking about databases
I. SQL transactions
1. What is a transaction: a transaction is an inseparable logical unit of work. It is used as the smallest control unit to execute concurrent operations on the database
I. Some batch processing statements have been written in the previous course. These batch processing statements have two problems: 1. parameters cannot be passed for running (customized) Like functions. 2. there is no way to call it repeatedly like
Mssql + operation class classDbQueryForMssql {& nbsp; ** & nbsp; * Maximum number of records returned by the select Method & nbsp; * & nbsp; constMAX_ROW_NUM100000; & nbsp; ** & nbsp; * Data Query Result set object & nbsp; * @ varobject $ dataSet &
Use transaction rollback to debug SQL statements to avoid the impact of incorrect operations on the database. Mark.
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> Begin
I have been writing the stored procedure recently, considering the applicationProgramScalability and performance: a large number of temporary tables are used. Because the performance of creating temporary tables with create table # temp is very poor,
/*
Test DataCreate Table TMP (a int)Insert into TMP (a) values (1)
*/
-- Include transactions Create Proc Sp_trantest_1 As Begin Tran Update TMPSet A = A + 1 Update TMP Set A = A / 0 If ( @ Error <> 0 )Begin Rollback Tran
This should start with ODS (Open Data Service) "open data service. It is mainly responsible for managing connections; the thread service of SQL and sending result sets, Status values, and messages to the customer. The result set is transmitted using
SQL Server Stored Procedure/function encryption/Decryption
Encryption of stored procedures and stored functions: With Encryption
Create procedure DBO. sp_xml_main
@ Table_name nvarchar (260) = '',
@ Dirname nvarchar (20) =''
With Encryption
As
Begin
SQL Server trigger instance details, SQL trigger
Microsoft SQL Server™2000 provides two main mechanisms to force business rules and data integrity: Constraints and triggers. A trigger is a special type of stored procedure, which is different from
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.