A one-to-many relationship in development is often used, and yesterday a customer problem was asked to organize the information for all feedback tasks into a single line to show and export Excel.My database correspondence: The feedback task task
1. Benefits of Automatic data file expansion1) does not appear because there is no remaining space available to the data cannot be written2) Minimize man-made maintenance3) can be used in databases where important levels are not very large, such as
The use of the--oracle trunc () function/************** Date ********************/1.select trunc (sysdate) from dual--2013-01-06 today's date is 2013-01-062.select trunc (sysdate, ' mm ') from dual--2013-01-01 returns the first day of the
windows+r→ type Sqlplus, enter the installed Oracle Database Super Administrator account password to log in. Show:Success.To create a table space:To create a user and default tablespace:Authorize the user to create a database operation:Code:sql>
It is easy to understand that a company is likened to a server, and the database is a department in the company.1.SID: A database can have multiple instances (such as RAC), and the SID is used to identify the name of each instance within the
1. View All Users:SELECT * from Dba_users;SELECT * from All_users;SELECT * from User_users;2. View user or role system permissions (System permissions that are directly assigned to a user or role):SELECT * from Dba_sys_privs; SELECT * from
Character functionsMathematical functionsDate functionConversion functionsTo_char (number/date) is the conversion of a date or number to a string
Convert a number to a specified format
To_char (1210.73,'9999.9')--would return ' 1210.7
Management of Oracle Tables--Adding dataInserting data into a table using the INSERT statementInsert Data basic syntax:INSERT into table[(column [, Column ...])] VALUES (value [, value ...]);insert into table name [(column name [, column Name 2 ...])
Basic syntax for building a table:CREATE TABLE table_name (Field1 datatype,Field1 datatype,Field1 datatype,...)NOTE : table_name table name; field specifies the column name (field name); datatype specifies the column type (field data type)Note: When
1. Create userCreate user KD identified by 123456;2. Grant permission to connect to the databaseGrant connect to KD;3, the Scott User's EMP table is authorized to KD can be queriedGrant SELECT on Scott.emp to KD;Grant CREATE table to KD;4. Reclaim
For Oracle. Whether you are connecting to a local database or a remote connection server database, you need to configure network services on your computer to connect.You may not be clear why.Take SQL Server first. SQL Server only needs to enter the
--Generate a script to update the trigger ('/' to create multiple triggers consecutively without error) for all HY start TablesSelect 'CREATE OR REPLACE TRIGGER'||table_name||'before UPDATE on'||table_name||'Referencing new as new old as old for
Authorization principle: Principle of least privilegeEmpower users with roles to simplify administrator administrative privilegesBusiness account creation:To create a specific table space:CREATE tablespace TBS1 datafile '/U01/APP/ORACLE/ORADATA/PROD4
--Modify the Oracle database character set to Utf-8: sql>conn/as sysdba; Sql>shutdown immediate; Sql>startup Mount; Sql>alter system enable restricted session; Sql>alter system set job_queue_processes=0; Sql>alter system set
This is my first blog ~In 2017-06-23, my project was off-the-shelf due to a power outage in the project, which resulted in a database server being hung up. This interface is displayed after a restart in the morning after the discovery of a toggle
Rollup Function Application Scenario: The main use in the grouping, each group to the total value (that is, subtotal), and finally all values (minus subtotals) sum (is total)Of course, the same effect can be achieved with union. Identify the groups
In the Oracle database environment of their own virtual machine, when tossing and making experiments, do not know what special changes, operations caused from the Sql*plus to start the database instance, reported the following error:Then use startup
The main contents include:(1) Three kinds of cycles and their simplification(2) Use of cursors(3) Exception handling(4) Stored procedures(5) Storage function(6) Trigger(7) Other PL/SQL operationsDefine variables---------------Loop loop---------------
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