Related
CodeAs follows:
1. Create sequence:
Copy codeThe Code is as follows: Create sequence sequ_data_datainfo increment by 1 start with 1 nocycle nocache noorder;
2. Create a trigger: Copy codeThe Code is as follows: Create or replace
First, let's take a look at SQL Server. Previously, we used the foreground to select a start time and an end time (in the smallest unit of day), and then used it as a condition for query, if we use "between starttime and endtime" as the condition,
I. Positioning
Oracle has two major parts: development and management. Development is mainly about writing stored procedures, triggers, and so on, as well as using Oracle's develop tool for form. Similar
Program Personnel, who need to have strong
I. There are two types of auto-incrementing self-segments for tables. One is that different tables use their respective sequence. The method is as follows:
1. Create a sequence in Oracle sequence first
Create sequence seq_idminvalue 1
Use the dbms_random package of Oracle combined with rownum. For example, 499 users are randomly selected:
Select * from
(Select * From Busi. t_ar_userinfo order by dbms_random.value)
Where rownum:
References for dbms_random, link:
Function:
1. Allow/restrict table modifications
2. automatically generate a derived column, such as an auto-increment Field
3. Forced Data Consistency
4. provide audit and logging
5. Prevent invalid transaction processing
6. Enable complex business
If you use the order by sorting statement to specify the order by employee number, all records generated after sorting are temporary data. How does the Oracle database process the temporary data?
Generally, the Oracle database first stores the
Create or replace procedure proc6338196642095312503719 (enter the news topic varchar2, enter the news content varchar2, enter the publishing time varchar2, enter the current page number, enter the number of lines per page, and output the current
Oracle System Requirements
Enterprise Edition: Minimum CPU Pentium 200 m recommended pentiumiii 1g or above
Minimum Memory 128 M recommended 512 m
Hard Disk Space System Disk 140 m mounting disk 4.5g (FAT32) or 2.75g (NTFs)
Standard Edition: Minimum
1. Connect to the local database
A. if the local machine has a static IP address, after oracle is installed, it can connect to the local Oracle database.
B. When oracle is installed, the local machine does not have a static IP address (that is,
1. Check which users are in the database?
Select username from all_users;
2. Check which DBA users are in the database?
Select username from dba_users;
3. view the tables owned by the current user?
Select table_name from user_tables;
4.
1. Intersect is the intersection of multiple query results;
2. query the SQL statements recorded in the table within two basic periods;
Select * From shengjibiao t where T. createtime between to_date ('2017-7-26 ', 'yyyy-mm-dd') and to_date ('2017-7-
Inner join ).
External Connection:
Full join, left join, and right join ).
Cross join ).
The outer join and the inner join are different. The query results returned by the outer join include not only the rows that meet the conditions, but also the
View the table space name and size
Copy codeThe Code is as follows: SQL> select t. tablespace_name, round (sum (bytes/(1024*1024), 0) ts_size
From dba_tablespaces t, dba_data_files d where t. tablespace_name = d. tablespace_name group by t.
1. Create a table
Copy codeThe Code is as follows: -- Create table
Create table test
(
Dm1 char (3 ),
Dm2 char (3 ),
Mc1 nvarchar2 (20 ),
Val nvarchar2 (20)
)
2. Fill in the following data:
DM1
DM2
MC1
VAL
101
1. query Table Name:
Copy codeThe Code is as follows: select table_name, tablespace_name, temporary from user_tables [where table_name = table name]
Where: table_name: Table Name (varchar2 (30 ));Tablespace_name: The tablespace that stores the
Duplicate data may be in the following two cases: the first is that only some fields in the table are the same, and the second is that the records in the two rows are the same.
1. Deletion of duplicated data in some fields
1. query duplicate
Copy codeThe Code is as follows: select a. f_username
From
(
SELECT/* + parallel (gu, 4) */distinct gu. f_username
FROM t_base_succprouser gu
Where gu. f_expectenddate> (select trunc (sysdate, 'y') from dual)
And gu. f_lotid = 1
And gu. f_playid = 4
The following information is from the Internet. You can paste it and save it for future use.
Character function -- returns the character value
All these functions receive parameters of the character family type (except for CHR) and return character
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