OracleBoot auto StartThe database and the Tomcat program need to be started automatically when the server shuts down the rebootOracle Database self-bootingThe Oracle database comes with a self-launching script that can be modified to useVim $ORACLE _
--upper-------Convert characters to uppercaseSELECT Upper (' ABCDE ') from dual;--lower -----Convert characters to lowercaseSELECT Lower (' ABCDE ') from dual;--initcap----- Returns the first letter of all words in uppercase, other lowercase
Want to see how many days the system is working? How long did the boot not restart?Windows systemC:\>systeminfo |find "System boot Time"System start-up time: 265 days, 4 hours, 26 minutes, 32 secondsLinux[Email protected] ~]$ uptime17:15:07 up 682
First, the Database system architecture:The outer layer (External level) is provided to the user for direct operationThe concept layer (conceptual level) is used to describe the types of data stored in the database, the relationships between tables,
Create or Replace function isexist (data in datatypes) --datatypes is the type of the data in the tablereturn numberIsV_flag number (2);V_data [datatypes]; --Types of data in tablesBeginSelect data into V_data from table_name where ...;If v_data
A function in the database contains four parts: declaration, return value, function body, and exception handling.
--Functions with no parameters
Create or Replace function Get_user return VARCHAR2 is
V_user VARCHAR2 (50);
Begin
Select
Core tips:function is used to return specific data. When executing, we need to find the return value of a variable receiving function; The syntax is as follows: Create or Replace function function_name (argu1 [Mode1] datatype1, argu2 [Mode2]
an administrative user1Querying user CollectionsSelectUsername fromdba_users; A queries whether a user existsSelectUsername fromDba_userswhereUsername='User name'2Querying user PermissionsSelect * fromDba_sys_privswhereGrantee='User name'3Create
(1) The Code of the Lock table query has the following form:Select COUNT (*) from V$locked_object;SELECT * from V$locked_object;(2) See which table is lockedSelect B.owner,b.object_name,a.session_id,a.locked_mode from V$locked_object a,dba_objects b
The Oracle sequence (Sequence) is primarily used to generate serial numbers, which are often used in applications, especially as ID values, which are used to make table primary keys.
However, sometimes when you need to modify the sequence initial
SELECT ROUND (number, [Decimal_places]) from DUALDescriptionNumber: The value that will be processedDecimal_places: Rounding, decimal number, not fill default is 0Sample:Select Round (123.456) from dual; Results: 123Select round (123.456, 0) from
Similar to the identity column identity,oracle in SQL Server, the same effect is somewhat small and complex, as follows:1 --1. Create a table2 Create TableStudent (3Idinteger not NULL Primary Key,4Namevarchar2( +) not
There are two ways to view Oracle instances:1. Tnsnames.ora, Listener.ora files in the installation directory650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/76/34/wKiom1ZMhY-Q3UeFAABK_MsTBWo655.png "title=" 00.png "alt="
Oracle study notes five SQL commands (III): Group by, sorting, connection query, subquery, paging, oracle Study NotesGroup by and HAVING clauses
Used to divide information into smaller groups.Each group of rows returns a single result for this group.
Create the PLUSTRACE role in the SQL * Plus environment.
Common users encounter a SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled error when enabling AUTOTRACE reports in SQL * Plus. As follows:
SQL>
SQL> set autotrace
Introduction to paging query of mainstream databases and paging of mainstream Databases1. Background
Because a project needs to display a large amount of data on the page, all data is first queried during database query and then displayed, at this
Summary of oracle flash back technology: Flash back query (DML)We need to display the time in set time on; to display the time. Delete the table first, and insert several rows of data. SQL> set time on; SQL> create table emp1 as select * from scott.
NVARCHAR2 Character Set mismatch in Oracle, oraclenvarchar2
An error is returned when NVARCHAR2 type is encountered during character matching in Oracle, prompting that the character set does not match.
To use NVARCHAR2, You need to convert the
ORACLE multi-Table query optimizationORACLE has a high-speed buffer concept. This high-speed buffer is used to store the executed SQL statements. Therefore, oracle has to do a lot of work when executing SQL statements, such as parsing SQL statements
Oracle Database grouping statistics by time, oracle statistics
SQL statement used by Oracle to group statistics by TimeTable 1 is as follows:
Number of days (exportDate) (amount) -------------- ----------- 14-2 month-08 20-3 month-08 2 14-4 month-08
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