statement for example 3-35, what changes will be found in the SQL buffer?Example 3-35Sql> SELECT * 2 from dept;Example 3-35 resultsAfter the Sql*plus l command of Example 3-36, you will find that the contents of the SQL buffer inch have changed to the statement you just entered.Example 3-36Sql> LExample 3-36 resultsThe above example also proves that the SQL buffer can only store one SQL statement.------------------------------------------Split Line
Preface: After installing the Oracle client, SQL Plus and PL/E could not connect to the remote Oracle database, possibly for the following reasons:Connection not on SQL plus:1 Possible causes: Before the Oracle database client was installed and not uninstalled cleanly, SQL
. The most obvious concept in PL/SQL Developer is that you can select a database instance to log in when you log in. This instance can be configured in the \network\admin\tnsnames.ora file. (ii) methods for creating a new DB instance 1 . Through the wizard tools provided by Oracle (recommended) 1) Start the Database Configuration Assistant: All Programs-->oracle--> configuration and porting tools 2) Fo
Label:One, sys users and system usersThe Oracle installation automatically generates SYS users and system users(1), sys user is superuser, has the highest privileges, has the SYSDBA role, has the rights to create database, the user's default password is Change_on_install(2), the system user is the management operator, the authority is also very large. With the Sysoper role, without the CREATE DATABASE permission, the default password is the manager(3)
/SQL_ELEMENTS4. htm#48515) 3. Character to date operation Select To_date (' 2003-10-17 21:15:37 ', ' yyyy-mm-dd hh24:mi:ss ') from dual The concrete usage is similar to the to_char above. 4. Use of the Trunk/round function Select Trunc (Sysdate, ' year ') from dual Select Trunc (sysdate) from dual Select To_char (trunc (sysdate, ' YYYY '), ' YYYY ') from dual 5.oracle data types with millisecond levels --Returns the current time, month, day, hour, min
maximum value and adds 1
fromPx_fxrecordreturn @FxNum
End
ALTER TABLEPx_fxrecordADD DEFAULT([dbo].[F_getfxnum]()) forFxnum--bind the function to Fxnum as the default value for the field Parameter description: Right (Str,len) -The field returns the rightmost Len character string strMax () -the largest value in the fieldIsNull () -Determines whether the content is empty convert () -format conversion Oracle: Ora
oracle| Create | page
Create an HTML page with Oracle's Sql*plus tool
Author: fenng
Oracle's Sql*plus tools have some interesting options, reasonable use, can give us unexpected consequences. One of the "-M" options can be created to create HTML reports that are useful in practical applications. Let's take a look at some of the options for Sql*
1. Open SQL Plus login directly, require username and passwordStart-"program-" oracle-"Application development-" SqlplusMy computer is "start"-"oracle-oradb11g_home1"-"Application Development"-"SQL Plus"After the database installation is complete, there are two system-level users:System default password: ManagerSYS def
Tags: Oracle time add_months interval1, Function: Add_months (Date,integer)--Add the specified time to a few monthsFor example:SELECT add_months (sysdate, 1) from DUAL; -The current time plus 1 months, that is, one months after the time.
SELECT add_months (sysdate,-1) from DUAL; --The current time minus 1 months, that is, one months ago.2, add and subtract a time for the sysdate.For example:SELECT sysdate +
Label:Oracle -built table names and field names are automatically converted to uppercase. Double quotation marks are case-sensitive in Oracle ,Oracle is case-sensitive, and all caps are default when double quotes are not used. Many people may mistakenly think that Oracle is case-insensitive, because when we write query statements, the case does not matter, the re
(SAL),Count (*), COUNT (Job), COUNT (Distinct (job)),Sum (SAL) from the EMP group by DEPTNO;2) Department 30 maximum wage, minimum wage, total number, number of jobs, number of jobs and sum of wagesSelect Deptno, Max (ename), Max (SAL),Min (ename), Min (Sal),AVG (SAL),Count (*), COUNT (Job), COUNT (Distinct (job)),Sum (SAL) from the EMP group by DEPTNO have deptno=30;3.stddev returns the standard deviation of a set of valuesSelect Deptno,stddev (SAL) from the EMP group by DEPTNO;Variance return
'- timestamp ' 2014-03-11 13:55:29.000 ') year to MONTH from dual
Select (timestamp ' 2015-04-10 14:52:19.000 '- timestamp ' 2014-03-11 13:55:29.000 ') Day (3) To SECOND from dual
Once we have the time interval, we can extract the components of the time interval through the EXTRACT function. [SQL]View PlainCopy
Select EXTRACT (Year from (date ' 2015-04-10 ' – date ' 2014-03-11 ') year to MONTH)
from dual
S
Requirements: There is a column name, VARCHAR2 type, the content is as followsThe above is sorted by the order by name, but not the result we wantNow you need to sort by numbers onlyFirst step: Extracting numbersSince the number has a two-bit one, it's not good to intercept with substr.We can use the regexp_substr function to extract substrings from a string using a regular expression.REGEXP_SUBSTR (Name, ' [0-9]+ ')second step, convert the number of the varchar type to a number of type intCAST
Label:Select User_sequence.nextval Form DualThe above attributes describe:keyproperty= "id": a property in a classOrder: Build Policy: (insert into before or after execution): default is After executionSequence in the User_sequence:oracleTo create a sequence:Create sequence User_sequenceStart with 1Increment by 1NomaxvalueMinValue 1NocycleCache 10;MyBatis (Oracle) How to use the primary key automatically plus
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.