Label:A transaction must have four properties: atomicity, consistency, isolation, persistence, and the first letter of these four attributes can be abbreviated as acid. The following code defines a transaction that inserts New Order data: --Start a new transaction
BEGIN TRAN; --Declare A variable
DECLARE @neworderid as INT; --Insert A new order into the Sales.orders table
INSERT intosales.orders (CustID, Empid, OrderDate, RequiredDate, ShippedDate, ShipperID, freight, ShipName, Shipad Dres
a transaction fails to execute.
The transaction rollback uses the rollback TRANSACTION command with the following syntax:
ROLLBACK [tran[saction] [transaction_name | @tran_name_variable
| Savepoint_name | @savepoint_variable]]
Where the savepoint_name and @savepoint_variable parameters are used to specify a rollback to a specified location.
If you want the transaction to roll back to the specified location, you need to set the SavePoint (save point) in the transaction. The save point is th
The ORACLE tutorial is the basics of Oracle PL/SQL language.
PL/SQL is an extension of ORACLE's standard database language. ORACLE has integrated PL/SQL into ORACLE servers and other tools, in recent years, more developers and DBAs have started to use PL/SQL. This article de
Original: SQL Server Tuning Series Basics (subquery operations Summary)ObjectiveIn the previous articles, we introduced a series of descriptions of operators and the optimization methods and techniques for each operator. This includes a series of our common operators, including how to view execution plans, how several datasets are commonly used, how to join operators, and parallel operators. Interested chil
Oracle|sql Language Oracle Pl/sql Language Foundation
2002-8-23
Oracle Pl/sql Language Basics
Pl/sql is Oracle's extension of the standard database language, Oracle has integrated PL/SQL into Oracle servers and other tools, and
Label: This series of "T-SQL Fundamentals" is primarily a summary of the T-SQL Foundation. "T-SQL Basics" 01. Single-Table query-several SQL query questions "T-SQL Basics" 02. Join Quer
Overview:This series of "T-SQL Fundamentals" is primarily a summary of the T-SQL Foundation."T-SQL Basics" 01. Single-Table query-several SQL query questions"T-SQL Basics" 02. Join Quer
Label:SQL Basics Grooming (i)-Database and SQL "Bo Master" anti-bone Aberdeen "original address" http://www.cnblogs.com/liqingwen/p/5902856.html sequenceDirectory
What ' s database
Database structure
SQL Overview
Create a table
deleting and updating tables
1-1 What ' s database1. Database (DATABASE,DB): A collection of data that can
operation This is it, the next we add to SQL Server on the use of the index and dynamic index content, About indexes I believe that many people who understand database products are familiar with it, but the way in which some statements in SQL Server take advantage of the index may not be clear, our next analysis of this piece, to understand the indexing method and optimization techniques, interested in adv
. Orderid,o1. Freightfrom Orders o1where O1. Freight>( SELECT AVG. O2. Freight) from Orders O2)The goal of SQL execution is to query orders that have more than the average shipping charge in the order.The clause that extracts the average freight here is a completely independent subquery that executes independently of the main query. At the same time here we take advantage of a scalar computation (AVG) so that it returns exactly one row.Look at the
Label:Original: SQL Server Tuning Series basics (Parallel operations Summary)ObjectiveLast three articles we describe how to view query plans, as well as some of the commonly used join operators, Union operators optimization techniques.In this paper, we analyze the parallel operation of SQL Server, as a multi-core computer prevalent today,
, next we will add some of the SQL Server parallel operations, Then analysis of our daily write additions and deletions to these operators to optimize the items, interested in advance attention, about the SQL Server performance tuning of the content is very broad, followed by the analysis in the article.If you have any questions, you can leave a message or private messages, and look forward to an in-depth s
Oracle BASICS (4) pl/SQL
PL/SQL is also a program Language called Procedural Language/SQL ). PL/SQL is an extension of SQL statements in Oracle databases. The features of the programming language are added to the use of common
returned in the recordset, and think about how it always satisfies your requirements.
These are just the beginning of mastering the SQL use. To help you learn more about the use of complex SELECT statements, let's take a look at the key standard terms: comparison operators, which are often used when you build your own select string to get specific data.
WHERE clause basics
The simplest way to start creat
DATABASE heavidb
MODIFY FILE (Name = heavidb,size = 20,filegrowth = 20,maxsize = UNLIMITED)
Modify the database using the DDL of the ALTER DATABASE statement to modify the file using the Modify files statement. For a complete database modification SQL, see:
https://msdn.microsoft.com/zh-cn/library/ms174269 (v=sql.120). aspx.
Deleting a database
The deletio
strive not to use cursors, because allocation and release of cursors are not required, which can greatly save database resources and improve efficiency.
Ii. Basics of dynamic SQL statements
In No. 1, we have used dynamic SQL. Here we will summarize the frequently used dynamic SQL programming
which some statements in SQL Server take advantage of the index may not be clear, our next analysis of this piece, to understand the indexing method and optimization techniques, interested in advance attention, about SQL Server performance tuning involves a wide range of content, followed by an analysis in the next article.If you have any questions, you can leave a message or private messages, and look for
storage, but the benefits are largely negligible. Conclusion This article first of all, this article mainly describes the T-SQL statement tuning from the execution plan of the following, and introduced a few common simple operators, the next one will focus on some of our most commonly used operators and tuning techniques, including: Join operators, aggregation operators, union operators, parallel operations, etc. The content of
not as good as Oracle ...!!!There are some children's shoes simply think that SQL Server is pediatrics, there is no technical content ... It's very simple.On these points, I don't want to spit out anything, I just want to let those friends who really know SQL Server to prove something to SQL Server.At the end of the article, we give a link to the previous articl
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.