Golang Access Oracle

1. Install the Linux installation firstHttp://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.htmlRPM-IVH oracle-instantclient11.2-basic-12.1.0.2.0.x86_64.rpmRPM-IVH oracle-instantclient11.2-sqlplus-12.1.0.2.0.x86_64.rpmExport

Data types in Oracle

VARCHAR2 (size) A variable-length string whose maximum length is size bytes; The maximum value of size is 4000 and the minimum value is 1; You must specify a size of VARCHAR2;NVARCHAR2 (size) A variable-length string whose maximum length is a size

Oracle Linux installation Process error: "Error in invoking target ' agent NMHS ' of makefile

Problem:When installing 11.2.0.4 on Redhat 7:Error in invoking target ' agent NMHS ' of makefile '/u01/app/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk '.Workaround:In $ORACLE _home/sysman/lib/ins_emagent.mksearch for the line: $

Oracle Traversal Tree

1: First the table in the database must be 2 of the tree structure:super_department_id For department_id The parent node number 3: The following statements are executed as a result:department_id = 88 records for all byte points and child

Accumulate Oracle information on a daily basis

For the VARCHAR2 type, we need to make a trade-off in memory usage and efficiency. For the VARCHAR2 (length >=2000) variable, PL/SQL dynamically allocates memory to hold the actual value, but PL/SQL allocates enough memory for the VARCHAR2 (length

Oracle creates and gives permissions to users

1 CREATE USER username IDENTIFIED BY password; --This is the creation user (this is the simplest creation statement without the specified tablespace) 1 GRANT CREATE SESSION TO username; --This ensures

Shell reads Oracle table and outputs to file

Export Oracle_base=/opt/oracleExport oracle_home=/opt/oracle/product/11gr1/dbExport Oracle_sid=oraLd_library_path= $ORACLE _home/lib:/lib:/usr/lib: $ORACLE _home/rdbms/libExport Ld_library_pathShlib_path= $ORACLE _home/lib32: $ORACLE _home/rdbms/lib3

Oracle's SUBSTR function

SUBSTR (string, intercept start position, intercept length)//return intercepted wordsubstr (' Hello World ', 0, 1)//return result is ' H ' * start with a string of length 1 from the first charactersubstr (' Hello World ', 1, 1)//Returns the result

ORACLE Sequence Usage

In Oracle, sequence is the serial number, which automatically increases each time it is taken. Sequence is not related to tables. 1, create Sequence first to have create Sequence or create any Sequence permissions. Create the statement as follows:

SUBSTR () InStr () Usage in Oracle

--substr (string, intercept start position, intercept length) = return the intercepted wordSelectSubstr'miaoying',0,1) fromDual--The returned result is: MSelectSubstr'miaoying',1,1) fromDual--The returned result is: m--description 0 and 1 both

Oracle Sub-Query

1. Sub-query to solve the problem: not one-step solution2. Issues of attention2.1 Brackets2.2 A reasonable writing style2.3 can be used in the where select have from2.4 You cannot use subqueries after GROUP by2.5 Emphasize the word query from the

Oracle View Lock Table

View the lock table process SQL statement 1:Select Sess.sid,sess.serial#,Lo.oracle_username,Lo.os_user_name,Ao.object_name,Lo.locked_modeFrom V$locked_object Lo,Dba_objects AO,V$session Sesswhere ao.object_id = lo.object_id and lo.session_id =

Oracle Find tree-structured data

Record a statement in Oracle looking for tree structure data:SELECT * FROM tablewhere xxxstart with org_id = ' xx ' connect by prior org_id = parent_id;The 1.CONNECT by clause indicates that each row of data is retrieved in a hierarchical order, and

Triggers in Oracle increase stored procedure commit problem

Triggers do not require a commitI can't write a commit.The trigger and the DML that triggered it are the same transactionDML commits, the action of the trigger is also submitted, or it is rolled back together.Of course, if you must write a commit in

Batch execution of Oracle SQL statements in code

Today is writing a tool (WinForm) that functions as a bulk insert OR UPDATE to a table in the Oracle database.Execution of the time always error "[911] ora-00911:invalid character"  I copy the SQL statements out to PL SQL to execute, and that's

Data Objects in Oracle

Data Objects in Oracle have tables, views, indexes, sequences, and so onRelated Operations for tables1. Create a tableWay one: Way two:CREATE TABLE person (

Oracle Cross-Library access

Ways to create Dblink:1. Create Public database link DblinkConnect to Totalplant identified by TotalplantUsing ' (DESCRIPTION =(Address_list =(ADDRESS = (PROTOCOL = TCP) (HOST = LOCALHOST) (PORT = 1521)))(Connect_data =(service_name =

Oracle Data learning the next day

today, we mainly strengthen the learning of some related functions of the data type of Oracle database .(i) char and varchar2 String functionsconcat (CHAR1,CHAR2) string connection function for connecting two strings.--equivalent operation:

Oracle's paging query

Oracle's paging query statements can be applied basically in the format given in this article.Paged Query format:View CodeSELECT A.* from( The most internal query, select * FROM table_name, represents the original query statement without paging.

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 month.3.select trunc (sysdate, ' yy ') from dual--2

Total Pages: 2147 1 .... 1629 1630 1631 1632 1633 .... 2147 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.