--Query and print the employee's name and salary
--set serveroutput on
/* 1, the cursor's properties
%found: False if the record is taken,
%notfound:
* *
DECLARE
--defines a cursor
cursor cemp is select ename,sal from emp;
--Define the
Question Prompt
Error tip: Error:ora-12514:tns:listener could not resolve service_name given in Connect
Workaround:
The code is as follows 1. Open /network/admin/listener.ora file, find: Sid_list_listener = (Sid_list = (Sid_desc = (SID_NAME =
global_name of Oracle database
Global_name of the Oracle database, as mentioned in the database link and global_names parameters, when setting the Global_names initialization parameter to TRUE, the local database link name must be GLOBAL_ with the
As a programmer, database operation is necessary, but if the operation is wrong, generally will cause more serious consequences.
Today, accidentally, did a worried thing, will be using the organization of the wrong operation of the delete, suddenly
Today, when you do a Java connection database, it appears:
Java.lang.ClassNotFoundException:oracle.jdbc.driver.OracleDriver
The error of this hint. Looking carefully, the JDBC driver is not loaded into project.
My code is as follows:
View Plaincopy
When you create a data table in a database, you need to define the types of all the fields in the table. Oracle has a number of data types to meet your needs. Data types are roughly divided into: character, number, date, LOB, and Raw. Although
Problem:When Windows Server 2012 installs Oracle 11g, the installer complains that the [INS-13001] environment does not meet the minimum requirements.
Analysis Reason:Winodws Server 2012 was not released when Oracle released 11g. Therefore, there
Oracle build table, and set the primary key to self increase
/*Create a user table*/CREATE TABLE user_info_t (ID integer NOT NULL,user_id varchar (50),User_name varchar (50),User_password varchar (50),User_sex varchar (20),User_age
When doing a project, you will encounter the migration of the Oracle database, then the sequence may be reset, causing the current value of the sequence to be less than the maximum value of the field in the table using the sequence, and there is an
Sql> CREATE SEQUENCE test_sequence2 2 increment by 1--increments 1 3 start with 1 at a time--starting with 1 4 nomaxval UE--No maximum value of 5 MinValue 1--Minimum =1 6 nocycle;
--Do not cycle Sequence created.
Sql> CREATE TABLE test_create_
Installation steps:1, first download a good Oracle installation package, the download after the two compressed files to the same folder, the folder for the database;
2, after the decompression, in the directory to open Setup.exe, after the
Problem Description:When generating large amounts of data for performance testing, the current table data 100w is generated from the stored procedure, and then the data for the past two months is generated from the current table data through another
1. Simple cycleLoopsequence of statements;End Loop;Cases:Declarea number:=100;BeginLoopa:=a+25;Exit when a=250;End Loop;Dbms_output.put_line (To_char (a));--note here with To_char ()End
2.For LoopFor counter in
First, install the ORACLE11G database:
Before you install the Oracle database on the Winserver R2 operating system, you need to start the system-Local. NET framework3.5 service feature, and note that instead of downloading the. NET framework3.5
I. Creating an instance of a package specification:Create or Replace package pack_op is
Procedurepro_print_ename (ID number,value2 out number);
Procedurepro_print_sal (ID number);
Functionfun_re_date (ID number) return date;
End Pack_op;
To create a
First, the prerequisite installation
1. Need to install QT5.2.0, this introduction installs is Qt-windows-opensource-5.2.0-mingw48_opengl-x86-offline.exe;
This article installs the directory: c:\Qt
2. Install Oracle Client,
This article is installed
Oracle Stored procedures:
CREATE OR REPLACE PROCEDURE getcity (
citycode in VARCHAR2,
ref_cursor out sys_refcursor/ * This sys_refcursor type is in the Sys.standard package * *
) as
BEGIN
OPEN ref_cursor for
SELECT * from
Set the field ID of the table T_uaer to self Increase: (implemented by the sequential sequence method)
----Create a tableCreate Table T_user (Id Number (6), UserID varchar2, Loginpassword varchar2, isdisable number (6));
----Create a sequenceCreate
1, the problem is: if the multiple threads under the same time query a data is not found, then go to insert, insert the time is also a multi-threaded insert.
So think of using select for update to control not allowing multithreaded inserts (in fact,
sequence
1, "sequence" and "view", like, does not occupy the actual storage space, but only in the data dictionary to save its definition information, when the user in their own mode to create "sequence", the user must have Create_sequence system
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