The SQL statements can be divided into two categories: the data manipulation language(DML) that let you work with the data in the database and the data definition language(DDL) that lets you work with the objects in the database.
SQL programmers typically work with the DML statements, while database adminstrators(DBAs) use the DDL statements.
The statements that work with the data in a database are called the data manipulation language(DML).
SQL statements used to work with data(DML)
Statements | Description |
SELECT | Retrieve data from one or more tables. |
INSERT | Adds new rows to a table. |
UPDATE | Changes existing rows in a table. |
DELETE | Deletes existing rows from a table. |
The statements that work with the objects in a database are called the data definition language(DDL). On large systems, these statements are used exclusively by database adminstrators, or DBAs. It's the DBA's job to maintain existing databases, tune them for faster performance, and create new databases. On smaller systems, though, the SQL programmer may fill the role of the DBA.
SQL statements used to work with database objects(DDL)
Statement | Description |
CREATE USER | Creates a new user for a database. |
CREATE TABLE | Creates a new table in a database. |
CREATE SEQUENCE | Creates a new sequence that automatically generates numbers. |
CREATE INDEX | Creates a new index for a table. |
ALTER USER | Changes the definition of an existing user. |
ALTER TABLE | Changes the definition of an existing table. |
ALTER SEQUENCE | Changes the definition of an existing sequence. |
ALTER INDEX | Changes the structure of an existing index. |
DROP USER | Deletes an existing user. |
DROP TABLE | Deletes an existing table. |
DROP SEQUENCE | Deletes an existing sequence. |
DROP INDEX | Deletes an existing index. |
GRANT | Grants privileges to a user. |
REVOKE | Revokes privileges from a user. |
相关推荐
We start with an introduction to the T-SQL language and data management systems, and then continue with the SQL Server product fundamentals. This first section teaches the essentials of the SQL Server...
From there, you will learn how to write Transact-SQL statements, execute simple and complex database queries, handle system administration and security, and use the powerful analysis and BI tools....
In fact, I’m counting on your already being familiar with the basic Transact-SQL statements, such as SELECT, INSERT, UPDATE, and DELETE, and knowing something of the basic architectural and security...
- **Subprograms**: Introduction to procedures and functions, which can be called from other PL/SQL blocks or SQL statements. #### 2. Using SQL*Plus and JDeveloper This chapter focuses on the tools ...
#### Chapter 1: Introduction to the SQL Procedure **What Is SQL?** Structured Query Language (SQL) is a standard language used for managing and manipulating relational databases. It allows users to ...
Embedded Dynamic SQL**: While embedded dynamic SQL is directly embedded within the application code and uses SQL statements to communicate with the database, DB2 CLI offers a more structured approach...
Structured Query Language (SQL) is the set of statements with which all programs and users access data in an Oracle database. Application programs and Oracle tools often allow users access to the ...
8. **Troubleshooting and Debugging**: The final part of the book focuses on troubleshooting and debugging SQL statements. Readers learn how to identify and fix common errors, optimize performance, and...
Submitting SQL Statements to the DBMS Using SQL in Microsoft Access 2007 Using SQL in Microsoft SQL Server 2008 Using SQL in Oracle Database 11g Using SQL in Sun Microsystems MySQL 5.1 SQL ...
3.5 Downloading SQL Statements from the Web Site . . . . . . . . . . 38 3.6 Ready? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 CHAPTER 4 SQL in a Nutshell ...
The chapter introduces programming as a set of instructions, or statements, written in a specific programming language that a computer follows to convert raw data into meaningful information....
Stored Programs as an Alternative to Expensive SQL Section 22.5. Optimizing Loops Section 22.6. IF and CASE Statements Section 22.7. Recursion Section 22.8. Cursors Section 22.9. Trigger ...
Start with an introduction to Java using an early classes and objects approach, then rapidly move on to more advanced topics, including GUI, graphics, exception handling, generics, collections, JDBC, ...
This abstraction layer makes it easier to manage data persistence without the need to write complex SQL statements. 3. **Autofac**: A powerful inversion of control (IoC) container that manages ...
The book aims to provide both defensive and proactive security strategies, making it an essential resource for developers looking to protect their applications from potential attacks. #### ...
RowSet 1.1: The introduction of the RowSetFactory interface and the RowSetProvider class, which enable you to create all types of row sets supported by your JDBC driver; see Using the RowSetFactory ...
The development aligns with the outcomes proposed in the new curriculum statements for South Africa but remains applicable to other countries in general. #### Key Features and Components - **...
Executing SQL Statements 232 Query Execution 242 Scrollable and Updatable Result Sets 254 Row Sets 260 Metadata 263 Transactions 273 Connection Management in Web and Enterprise Applications 278 ...