1. CREATE DATABASE database_name [WITH LOG IN “pathname”]
Create a database.
database_name: The name of the database.
“pathname”: Transaction log file.
Create a database_name.dbs directory with access rights set by GRANT. You can't use transaction statements such as
BEGIN WORK without a log file (can be changed with the START DATABASE statement).
You can select the log file for the current database.
For example: select dirpath form systables where tabtype = “L”;
Example: create databse customerdb with log in “/usr/john/log/customer.log”;
2. DATABASE databse-name [EXCLUSIVE]
Select the database.
database_name: The name of the database.
EXCLUSIVE: Exclusive status.
Access the database in the current directory and the directory specified in the DBPATH. Do not use this statement during transaction processing.
Example: dtabase customerdb;
3. CLOSE DATABASE
Close the current database.
database_name: The name of the database.
After this statement, only the following statements are legal:
CREATE DATABASE; DATABASE; DROP DATABSE; ROLLFORWARD DATABASE;
This statement must be used before deleting the database.
Example: close database;
4. DROP DATABASE database_name
Delete the specified database.
database_name: The name of the database.
The user is the owner of the DBA or all tables; delete all files, but does not include the database directory; the current database is not allowed to be deleted (the current database must be closed first); this statement cannot be used during transaction processing. ROLLBACK WORK also cannot restore the database.
Example: drop databse customerdb;
5. CREATE [TEMP] TABLE table-name (column_name datatype [NOT NULL], …)
[IN “pathname&rdquo ;]
Create a table or temporary table.
table-name : Table name.
column_name: The name of the field.
data-type: Field data type.
path-name: Specify the storage location of the table
TEMP is used to specify the temporary table; the table name should be unique, the field should be unique; the user with CONNECT permission can create the temporary table; The table defaults to allow CONNECT user access, but not ALTER.
Example: create table user
( c0 serial not null, c1 char (10), c2 char(2), c3 smallint, c4 decimal(6,3),c5 date ) in “usr/john/customer.dbs/user;
6. ALTER TABLE
ALTER TABLE table-name{ADD (newcol_name newcol_type [BEFORE oldcol_name], …)
Think about it, what if you want to change the size of an image to a smaller size? Of course, I will
Git as the worlds most advanced distributed version control system (no one), presumably many people
busybox is a Linux command box that integrates many of the tools and commands that compress Linux.
Bill · Gates attitude towards software is: If you want good software, you have to pay for it.
Awk string concatenation operation (string to number, number to string)
Linux often crashes, stuck, what should I do?
Suse linux single-user mode to modify the root password
Linux failure boot is deleted recovery measures
Linux/Windows/Mac refresh DNS cache
Unix network programming entry basic tutorial
CentOS6 mounts read and write NTFS partitions (ntfs-3g)
Linux system centos shutdown and restart command detailed
Modify the output of snort's socket mode
Linux system backup strategy discussion
Connect the USB flash drive to the VMware virtual machine Tutorial
Analysis of PCB software tools under Linux
Turn off system remote assistance function: Windows 7 system security settings
Symantec helps users move safely and securely to Windows 7
Win8 part of the program can not run the solution
Magical use of blank keys in Microsoft Windows 7 system
Win8 system taskbar program icon color error error solution
Traffic Monitoring and Restriction in Windows Server 2008
Use Ghost to erase bad sectors of hard disk
Win8.1 can not open the disk prompt location is not available solution