1. Use logical operation symbolsQuestion: Query for wages higher than 500 or job manager employees, but also to meet their initials in uppercase J?SELECT * from emp where (Sal > $ or job = ' MANAGER ') and ename like ' j% ';2. Use the ORDER BY
2015-10-23DirectoryResources[1] Lin Shuze. Oracle 11g R2 dba operation Guide [M]. Beijing: Tsinghua University Press, 2013[2] Oracle archive log[3] Oracle Archive log[4] Oracle archive log[5] See if the Oracle database is archived and Modified
Previously summary:In queries through the SELECT statement, the returned result is typically a collection of multiline records. The cursor mechanism is provided for this SQL. Cursors can act as pointers so that the application design language can
in implementation, we may encounter customer requirements for the display title. For example, the original title is: Guangxi Longtan Hospital on the further strengthening of Government information submission work notice. And then they want to show
BrieflyA PL/SQL program block named in the database that can pass several parameters and usually have no return value . cannot be directly SQL Call Execution , but by Execute command or PL/SQL call execution in the program block .Syntax formatCreate
Delete the name of the table (record and structure) Delete ———— truncate ———— dropDelete (deletes the statement recorded in the data table)DELETE from table name WHERE condition;Note: Deleting a record does not release the block table space that is
The Dbms_output package is primarily used to debug PL/SQL programs, or to display information (displaying message) and reports in the Sql*plus command, such as we can write a simple anonymous PL/SQL program block that is used for some purpose dbms_
Go to: http://blog.163.com/aner_rui/blog/static/12131232820105901451809/2. Keep One (this should be what most people need ^_^)Delete hzt Where ID not in (the Select Max (ID) from Hzt Group by Title)Note: The maximum one record for the ID is retained
Environment: Redhat 5.9 64-bit, Oracle 10g1.To modify the Dbstart script:$ VI $ORACLE _home/bin/dbstart#ORACLE_HOME_LISTNER =/ade/vikrkuma_new/oracleoracle_home_listner= $ORACLE _home2.Modify the/etc/oratab to the following format:$ vi/etc/oratabSID:
It is well known that Oracle will take up a lot of memory when booting up, and you have to go to the computer service to find services every time you want to use it. A startup of one, more troublesome. Here are two bat scripts to directly
If the data in the Oracle data table is not responding when it is being hacked, it is likely that the table is locked. Use the following command to resolve the locking problem.Lock table Status query. Copy and paste directly to it.--Lock Table Query
1, do not use ' * ' instead of all column names, especially if the field is more than the caseUse SELECT * To list all column names for a table, but there is a dynamic parsing problem with Oracle. The Oracle system translates ' * ' into all column
The following statements can be used to query the 11g alarm log storage path:--Show the location of the Diagnostic_dest1.show parameter diagnostic_dest; --Querying the directory of XML files2.select value from V$diag_info where name= ' diag Alert ';-
Pagination to the result set
To make it easier to query data on a web page, it is often displayed by page. For example, the employee table is required to display only five rows of data at a time, and the next five rows are displayed. The following
ORA-01033: ORACLE initialization or shutdown in processOracle encountered a problem: after entering the user name and password in PL/SQL, a title error occurred. I have not backed up all the database databases in a project, and there is still a lot
Sort values in different columns based on conditionsSometimes the ordering requirements are complex. For example, if a leader is more interested in employees with salaries between 1000 and 2000 yuan, the employees with salaries in this range must be
Convert null values to actual valuesCreate a test table:
Create or replace view v asselect null as c1, null as c2, '1' AS c3, null as c4, '2' AS c5 FROM dualUNION allselect null as c1, null as c2, null as c3, '3' AS c4, '2' AS c5 FROM dual; SELECT *
Oracle to_number, to_char, to_date usage, to_numberto_date
TO_DATE converts a string to a date type conversion function in the database.TO_CHAR converts a date or number to a string.TO_NUMBER converts a character to a numberTO_DATEUse the TO_DATE
Oracle's to_number, to_char, and to_date usageTO_DATE is to convert the string to the date type conversion function in the database TO_CHAR is to convert the date or number to the string TO_NUMBER to convert the character to the number TO_DATE using
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