As follows: BEGIN SELECT name into v_name from t_student WHERE id = ' 101 ' EXCEPTION when no_data_found Then v_name: = "; END;In this way, you do not have to select COUNT (1) from t_student where id = ' 101 ' in advance
Object Types for Oracle Object TypeIn PL/SQL, object-oriented programmers are based on object types. The object type is a user-defined composite data type that encapsulates the data structure and the procedures and functions used to manipulate those
Create directory gives us the flexibility to read and write files in an Oracle database, greatly improving the ease of use and scalability of Oracle.Its syntax is:CREATE [OR REPLACE] Directory directory as 'pathname';This case is specifically
After restoring a database on the Oracle test server, a TNS-12541, tns-12560,tns-00511 error occurred when starting the listening service, as shown in the following scenario:[Email protected] admin]$ lsnrctl statusLsnrctl for linux:version 10.2.0.4.0
Oracle TIP error message ora-28001:the password has expiredLog in with Sqlplus/as SYSDBA on the Oracle server to view the account status using the following SQL statement:Select from Dba_users;Find the corresponding user name, if the status is
1. Client-side encodingView method: Open the registry of the server where the database resides (enter regedit in the Run window) Hkey_local_machine->software->oracle->home0->nls_lang, Check out what the database client code is.2. Server-side
Once encountered such a requirement: Request for method passed in string, content such as "user ID0, user ID1, user ID2 ...", and then according to these IDs return a result set as a data table for others to query.SELECT * FROM TBL WHERE ID IN
The Oracle 11g is usedIn fact, it has been a few, but not much study, now began to re-learn, including SQL statements and so on.Start after installation,I installed the client sqldeveloper, but I need to connect after entering, I forgot how to do it,
Oracle ora-01033:oracle initialization or shutdown in progress error resolution"ORA-01033" error when logging into databaseIn the command window, log in as sqlplus as sysdba--note that the value after the sqlnet.authentication_services parameter in
a) Date function [focus on the first four date functions]1.add_months[return date plus (minus) The date after the specified month (before)Add_months (D1,N1)"Function": Returns the new date after the date D1, plus N1 months."Parameters": D1, Date
First, the principle of startup and shutdown of Oracle1. Oracle Boot Step AnalysisSql> Startup-This is the command to start the databaseORACLE instance started. --first stage, launch instance, Nomount stateTotal System Global area 608174080
Indexes in OracleIn a relational database, an index is a database structure that is related to a table and is another important schema object other than a table. An index is a helper object that is built on one or more columns of a table to increase
The structure of the Oracle IF statement is similar to most languagesIF condition then expr; elsif condition then expr; ELSE expr; END IF;As an example:Select count (Distinct index_name) INTO CNT FROM USER_INDEXES WHERE Table_name=c1. table_name;
Decode function usage in OracleMeaning explanation:Decode (condition, value 1, return value 1, value 2, return value 2,... Value N, return value N, default value)The function has the following meanings:IF condition = value 1 ThenRETURN (translation
Oracle statistics collectionCollect statistics
1: Create an analysis table
$ Cd $ ORACLE_HOME/rdbms/admin $ sqlplus/as sysdba> @ utlxplan. SQL
2: For convenience, you can create a synonymous table (by default, only sys users can use it)
SQL>
Oracle inversion Function
Oracle provides a reverse inversion function, reverse, but this function cannot be used for grouping inversion. This article provides a function that can be used for grouping inversion, as shown below:
Create or replace
Some advanced management case studies of ORACLE11GDataGuardAfter setting up ORACLE 11G dataguard, I also conducted a Role Switching experiment. switchover has failover, and I feel a lot of benefits. Then I continue to study some of the advanced
Auto increment of ID fields in the SQL _Oracle table
Objective: To automatically increment the ID field when inserting data into a table.
Start the experiment:
(1) Create an experiment table
Createtable test_ID_add
(
Id number (10 ),
USERNAME
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