I want to use a temporary table in Oracle today, so I wrote it!
Create global temporary table tablename (Col1 varchar2 (10 ),Col2 number) On commit preserve (delete) rows;
-- On commit Delete rows indicates that the temporary table is specified by
Create or replace type mytable as table of varchar2 (100) /
Create or replace function split (SRC varchar2, delimiter varchar2) return mytable is psrc varchar2 (500); A mytable: = mytable (); I Number: = 1; -- J number: = 1; begin
Select extract (year from execution_end_date) as year, extract (month from execution_end_date) as month,Department_id, count (form_no) CIP DataFrom cip_masterGroup by extract (year from execution_end_date), extract (month from execution_end_date),
If-then-else logic in decode is often used in logic programming for logical judgment. In decode syntax, this is actually the logic processing process. Its syntax is as follows:
Decode (value, if1, then1, if2, then2, if3, then3,... else)
Value
1. Use the to_date function (insert a date value in a specific format)
Example: insert into EMP values (9998, 'skycloud', 'manager', 7782, to_date ('2017-11-11 ', 'yyyy-mm-dd'), 10, 10, 10 );
2. Insert data using a subquery
When a values clause is
Permission refers to the right to execute specific types of SQL commands or access other solution objects, including system and object permissions.
1. System PermissionsSystem permission refers to the right to execute specific types of SQL commands.
1. What is a transaction?
Transactions are used to ensure data consistency. They are composed of a group of related DML statements. The group's DML statements (data operation language, add, delete, modify, and no query) are either all succeeded, or
A role is a command set for related permissions. The main purpose of a role is to simplify permission management.1. Connect to the database2. Select, insert, and update in the Scott. EMP table.If direct authorization is used, 12 authorizations are
In Oracle, sequence is the so-called serial number, which is automatically increased every time it is obtained. It is generally used in places where the sequence numbers need to be sorted.1. Create SequenceFirst, you must have the create sequence or
Oracle Database Process Overview:
Database buffer cache is mainly used to store data blocks in data files.
Data blocks in the database cache are the basic unit for information exchange between the cache and data files. Before Oracle Database 8 I,
For external connections, "(+)" can be used in Oracle, and "left/right/full outer join" can be used in 9i. The following describes the external connections with instances.
1. left Outer Join: left Outer Join
Select E. last_name, E. department_id, D.
1. Create a stored procedureCreate or replace procedure Test (var_name_1 in type, var_name_2 out type)-- Declare a variable (variable name and variable type)Begin-- Execution body of the stored procedureEnd test;
Print the input time informationE. g:
First, let's take a look at the basic knowledge:
We know that there is a function rawtohex (rawvalue) in Oracle, which converts raw values into a corresponding hexadecimal string. Each byte in rawvalue is converted into a double byte string. When we
To_char converts a date or number to a string.To_date converts a string to the date type in the database.Conversion functionsTo_charUse the to_char function to process numbersTo_char (number, 'format ')To_char (salary, '$99,999.99 ');Use the to_char
Keywords: Han number rank, over partition use
Rank () function. These permutation functions provide the ability to define a set (using the partition clause) and then sort the elements in the Set in a certain sort method, the following uses the
Singing the song that nobody cares about ~ If one day, I will always be at a loss ~ Please leave me in that time ~
Question:
The answer is: exhibit is a graph of many tables. If it is left blank, it simply checks whether count and nvl will be used.
It is a pleasure to write a blog every day, but it is also a good habit to read other people's blogs carefully. At the same time, it is a good habit to write a blog worth reading. If one day, we have at least left our footprints...
Question:
Answer:
Installation preparation:Download filesL Oracle Database 10g Release 2 (10.2.0.1) SoftwareDecompress the fileCommand to decompress the file:Unzip 10201_database_linux32.zipThe decompressed folder may be "Database" or "DB/disk1"Hosts
[Oracle] managing Oracle9i services in Windows Author: builder.comWednesday, June 30 2004 pm
Install Oracle 9 in WindowsIMany services will be installed, and some of them are configured to start at Windows startup.
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.