A statement that creates a new user for a database
CREATE USER ap IDENTIFIED BY ap;
A statement that grants privileges to a user
GRANT ALL PRIVILEGES TO ap;
A statement that creates a new table
CREATE TABLE invoices ( invoice_id NUMBER, vendor_id NUMBER NOT NULL, invoice_number VARCHAR2(50) NOT NULL, invoice_date DATE NOT NULL, invoice_total NUMBER(9,2) NOT NULL, payment_total NUMBER(9,2) DEFAULT 0, credit_total NUMBER(9,2) DEFAULT 0, terms_id NUMBER NOT NULL, invoice_due_date DATE NOT NULL, payment_date DATE, CONSTRAINT invoices_pk PRIMARY KEY (invoice_id), CONSTRAINT invoices_fk_vendors FOREIGN KEY (vendor_id) REFERENCES vendors (vendor_id), CONSTRAINT invoices_fk_terms FOREIGN KEY (terms_id) REFERENCES terms (terms_id) );
A statement that adds a new column to a table
ALTER TABLE invoices ADD balance_due NUMBER(9,2);
A statement that deletes the new column
ALTER TABLE invoices DROP COLUMN balance_due;
A statement that creates an index on the table
CREATE INDEX invoices_vendor_id_index ON invoices(vendor_id);
A statement that deletes the new index
DROP INDEX invoices_vendor_id_index;
A statement that creates a sequence for generating invoice_id values
CREATE SEQUENCE invoice_id_seq START WITH 115 INCREMENT BY 1;
相关推荐
A comprehensive tutorial on both SQL Server 2005 and ADO.NET 3.0, Beginning C# 2008 Databases explains and demonstrates how to create database objects and program against them in both T–SQL and C#....
Database profiles give you the opportunity to connect to databases in one touch and work with the selected databases only. Powerful database object management Firebird Maestro provides you with an...
Framework - How-To Work with XML Framework - Key Benefits Framework - Partitioning your application Framework - role based security with Enterprise Services Framework - Scoping, Overloading, ...
* How to work with HTML controls, use models in Rails applications, and work with sessions * Details on working with databases and creating, editing, and deleting database records * Methods for ...
How to work with object fundamentals: writing classes and methods, instantiating objects, creating powerful class hierarchies using inheritance. Master advanced object-oriented features, including ...
How to work with JSON Data transmission via Ajax Incorporate Handlebars templates into your development Get up and running with NodeJS Perform HTTP requests to a local Web Server Implement a NoSQL ...
Improve your ability to develop, manage, and troubleshoot SQL Server solutions by learning how different components work “under the hood,” and how they communicate with each other. The detailed ...
How to use LINQ to Objects to query in-memory data collections such as arrays, ArrayLists, and Lists to retrieve the data you want. Why some queries are deferred, how a deferred query can bite you, ...
Gradually, you will learn the core elements of Aspect-Oriented Programming and how to work with Spring MVC and then understand how to link to the database and persist data configuring ORM, using ...
- **Working the Association**: This covers how to manipulate associated objects and ensure that changes are correctly synchronized with the database. - **Collection of Values**: This introduces the ...
### Oracle Database 10g PL/SQL ... From basic concepts to advanced features, this resource equips readers with the knowledge necessary to effectively utilize PL/SQL for database application development.
Connect your Python applications to a PostgreSQL database and work with the data efficiently Test your database code, find bottlenecks, improve performance, and enhance the reliability of the ...
Discover how to design, develop, and maintain your database application effectively with PostgreSQL About This Book Understand how to utilize the most frequently used PostgreSQL ecosystem-related ...
The book gives insight into how features work and how to apply them to get the most out of your MySQL experience. The book covers topics such as: The headline feature in MySQL 8 MySQL's answer to ...
<END><br>53,ADOclient-side.zip In a network environment, open a connection to a database, retrieve data, close the connection, work with the data, reopen the connection to communicate with the ...