CREATE TABLE STUDENT (--Creating student tablesID Number (TEN) PRIMARY key,--primary Key IDSNAME VARCHAR2 (20),);--Create a stored procedure to add a record to a student tableCREATE OR REPLACE PROCEDURE procedure_add(in_id in
hexadecimal conversion to decimal: To_number ()Sql> Select To_number (' A ', ' X ') from dual; To_number (' A ', ' X ')------------------10Decimal conversion to 16 binary: To_char ()Sql> Select To_char (ten, ' xxx ') from dual; To_char (, '----------
1. If you update a table, without an error, waiting for a long time is not over, it is likely that the table is locked.2. View Locked objectsSelect sid,serial#,username,schemaname,osuser,machine,terminal,program,owner,object_name,
Reprint: http://www.linuxidc.com/Linux/2008-02/11238.htmThe first few days after the OCI connected to the database problem, with the Oracle's own example test, can read the data (all in English), it is safe to go to develop other modules. These days
Add to Oracle User's ~/.bash_profilenls_lang= "Simplified Chinese" _china. Zhs16gbkExport Nls_langThen save the exit,SOURCE ~/.bash_profileLogin again Sqlplus garbled on the lost.Note: The specific values of Nls_lang are modified according to the
I always thought that Oracle would only lock in the data that needed to be modified, but in parallel, the parallel update would lock the whole table, the following experiment:Session1:Sql> select Sid from V$mystat where Rownum=1;Sid----------11Sql>
--oracle Database Creation Table spaceCreate Tablespace New_taspace--Table space nameDataFile ' D:\NEWTABLESPACE. DBF ' -the data file and location associated with the tablespaceSize 200M --File Initial sizeAutoextend on next 20MB MAXSIZE 400MB;
The method to do the map match1 the algorithm proceduresFirst, we should find the most nearest road to the point from all roads in haerbin;Second, we should find the most nearest point-to-the-point from the road.For example, as Figure 1, we'll do
First, the concept of ROWIDStores the location of row in the data file: 64-bit encoded data, A-Z, A-Z, 0-9, +, and/,How row is stored in the data blockSELECT ROWID, last_name from hr.employees WHERE department_id = 20;For example:
--Initialize datadrop table test Purge;CREATE TABLE Test as SELECT * from Dba_objects;Delete from test where object_id is null;ALTER TABLE TEST ADD constraint pk_test_object_id primary key (OBJECT_ID);CREATE INDEX ind_t_object_name on test
1. Open cmd window, enter Sqlplus/as SYSDBA2, run CMD, enter the ALTER user username account unlock;3. Alter user name (System) identified by new password (m1234); Change Password (note: Be sure to enter the letter in the English input state,
The data pump export library is used in the Linux operating system.
1. create the physical directory dp_dir on Linux to store the database. dmp file;
Log on as a root user, switch to an oracle user, and create a physical directory as follows:
[Root @
Export oracle comments and oracle comments
Indicates that a user has a comment + Table comment + field details + field comment
select ATC.OWNER, atC.TABLE_NAME, utc.comments, ATC.COLUMN_NAME, ATC.DATA_TYPE,
Oracle Database beginners opening
Preface:
For project reasons, I recently started to learn Oracle databases. Oracle is currently one of the most popular databases, with powerful functions and excellent performance. It is relatively difficult to
Solution to ORA-12560: TNS: protocol adapter errorsThere are three reasons for the problem that caused the ORA-12560: TNS: protocol adapter error:1. The listening service is not started. On the windows platform, perform the following operations:
Flashing back after oracle11gdroptable
-- Initialize the data drop table test purge; create table test as select * from dba_objects; delete from test where object_id is null; alter table test add constraint pk_test_object_id primary key (object_id );
Oracle divides a column into multiple columnsOracle divides a column into multiple columns
In Oracle, we can use listparts (Oracle 11g and above) to merge multiple rows into one column. Now we need to split one column into multiple columns.
Create a
Oracle Data Recovery
Recently, I am confused about how to clear the table data in oracle.
1. Back up the current data first. It is a good habit to back up data. Remember that there must be a backup each time you operate the database.
2. select *
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.