数据操作语言-SQL语言基础

时间:2024-05-15 13:25:03
【文件属性】:

文件名称:数据操作语言-SQL语言基础

文件大小:5.26MB

文件格式:PPT

更新时间:2024-05-15 13:25:03

SQL 基础

数据操作语言 * DML语句在下列情况下发生: 往一个表中增加新行 更改一个表中现有的行 从一个表中删除掉现有的行 一个事务由一组构成一个逻辑操作的DML语句组成. * Data Manipulation Language Data manipulation language (DML) is a core part of SQL. When you want to add, update, or delete data in the database, you execute a DML statement. A collection of DML statements that form a logical unit of work is called a transaction. Consider a banking database. When a bank customer transfers money from a savings account to a checking account, the transaction might consist of three separate operations: decrease the savings account, increase the checking account, and record the transaction in the transaction journal. The Oracle Server must guarantee that all three SQL statements are performed to maintain the accounts in proper balance. When something prevents one of the statements in the transaction from executing, the other statements of the transaction must be undone. Instructor Note DML statements can be issued directly in SQL*Plus, performed automatically by tools such as Oracle Developer or programmed with tools such as the 3GL precompilers. Every table has INSERT, UPDATE, and DELETE privileges associated with it. These privileges are automatically granted to the creator of the table, but in general they must be explicitly granted to other users. Starting with Oracle 7.2, you can place a subquery in the place of the table name in an UPDATE statement, essentially the same way a view is used.


网友评论