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)