The most common SQL statements and SQL statements for oracle project deployment and maintenance

Source: Internet
Author: User
Tags import database

The most common SQL statements and SQL statements for oracle project deployment and maintenance

Hello everyone, this is some of the oracle Database SQL statements that are most commonly used when I deploy a project to the site.


-- Create a data table space

Create tablespace pssts
Logging
Datafile 'd: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ pssts. dbf'
Size 10 m
Autoextend on
Next 10 m maxsize 20480 m
Extent management local;

-- Create a user and specify the tablespace

Create user pssts identified by pssts123 default tablespace pssts temporary tablespace temp;


-- Authorize a user

Grant connect, dba to pssts;

-- Import database
Imp pssts/pssts123 @ orcl fromuser = stpssts touser = pssts file = D: \ log = D: \ 2.log

-- Export Database

Exp pssts/pssts123 @ orcl file = D: \ pssts. dmp owner = pssts log = D: \ pssts. log


-- Delete a user
Drop user pssts cascade;


-- Delete a tablespace


Drop tablespace pssts including contents and datafiles;
How can I use one statement in SQL or Oracle to change the two results?

Use DECODE to solve the problem, or use the case when statement.
Update class set sex = decode (status, '0', 'male', '1', 'femal ');
Or
Update class set sex = (case status = '0' then' male 'else' female 'end );

Supermarket system maintainer (Common SQL statements and commonly used DOS commands)

Common SQL statements
Data Definition: create table, drop table, and alter table)
Data Operations: select (query), insert into (ADD), update (modify), delete (delete)

The basic SQL statements of SQL Server and oracle are the same. query, modify, and create tables can be common. Although there are many differences between these two systems, they are not very different for beginners. They can be considered as two different dialects of the standard SQL language.

Common doscommands
Dir (column directory), cd (Change directory), md (create directory), rd (delete directory), del (delete file), deltree (delete directory and file) copy (copy file), xcopy (copy directory), move (move file), cls (clear screen), type (display file content), ren (change file name) attrib (modifying file attributes), fc (file comparison), date (set date), time (Set time), chkdsk (check disk), fdisk (hard disk partition) format (format partition), ping (network connectivity test), arp (display arp protocol information), route (set route information), tracert (display route tracking information) ipconfig, netstat, ftp, and telnet)

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.