Row to column should be the database is more common operation, in Oracle can use pivot, decode, can refer to the blog of the Melon:http://blog.csdn.net/ch7543658/article/details/41146809SELECT name, Max (DECODE (course, ' Java ', Gread)) as
1.Oracle provides privileged users, such as SYSDBA or Sysoper, who are primarily used to perform maintenance operations on the database, such as starting a database, shutting down a database, establishing a database, and performing operations such
SQL syntax Exercise: 1, select all employees in department 30 select * from EMP where deptno=30;2, lists the clerk's name, number and department number select ename, empno, deptno from Empwhere job=u Pper (' clerk '); 3, find the employee with a
I. Naming rules for table and column names1), must start with a letter2), length cannot exceed 30 characters3), cannot use Oracle's reserved words4), can only use the following characters a-z,a-z,0-9,$, #等Ii. Types of data1), character classChar has
Packages are used to logically combine procedures and functions, which consist of package specifications and package bodies.1), we can use the Create Package command for creating packages such as:I, create a package sp_packageII. Declare that the
First, create a userOverview: In Oracle, to create a new user using the Create USER statement, you typically have DBA (database administrator) permissions to use.Create user username identified by password;Note: Oracle has a problem, the password
Quote this big:
Http://www.cnblogs.com/lovemoon714/archive/2012/02/29/2373695.html
1. Why should I use the package? A: In a large project, there may be many modules, and each module has its own procedures, functions and so on. And
Quote this big:
Http://www.cnblogs.com/lovemoon714/archive/2012/02/29/2373780.html
1. Concept and use Similar to a custom type in C, you can use it to define a field collection for a table.Defines the format type Recordname is Record
This article explains the parameters of the storage when creating a new table in an Oracle database, using charts and examples.Available for: Table spaces, rollback segments, tables, indexes, partitions, snapshots, snapshot logs
Analysis of the merge statement:/**The merge statement is a new syntax for merging the UPDATE and INSERT statements oracle9i.With the merge statement, another table is queried based on the join criteria of one table or subquery,The connection
SQL Code
123456789101112131415161718192021st22232425
There is a table named TB, field segment named Name, data type nchar ( -).1. Assuming that the field data is empty, you can do it directly, regardless of the field type you
SQLLDR: Generally used to import files ending with any suffix, this time I was just trying to import a file with a suffix of. 20160101.Combined with the use of input.ctl, can be used under DOS, you can import hundreds of thousands of, millions of
The following exercises have the default table in the Oracle database as the Principal1. List all departments that have at least one employee.SELECT DISTINCT d.dname from EMP e,dept D WHERE e.deptno=d.deptno;SELECT * from DEPT WHERE DEPTNO in
In OracleYou can use the InStr function to judge a string to determine whether it contains the specified character.Finds the specified character in a string, returning the position of the specified character that was found.Grammar:InStr
In the Oracle database, sometimes the ALTER SYSTEM kill session ' sid,serial# ' is used to kill a session process, but after the session is killed with this SQL statement, the database does not immediately release the associated resources. Sometimes
Note: This article does not enumerate all the differences between the two, but in the actual application found in the different function points or processing mode, the reason is recorded, is to remind themselves, do not forgetGROUP BY:(1) Oracle,
Turn characters in Oracle: To_char ()Date of change in Oracle: To_date ()The turn character in MySQL: date_format (date, '%y-%m-%d ') is equivalent to To_char () in OracleDate of transfer in MySQL: str_to_date (date, '%y-%m-%d ') equivalent to
A FOREIGN key constraint (that is, referential integrity constraints)Example: There are two tables following the referential integrity between themCreate Tablestudent (--Student tableS_ID Number (5) primary key,S_NAMEVARCHAR2 (20),T_IDVARCHAR2
Oracle cascade query and Oracle cascade QueryThere is a method in ORACLE Database for cascading QuerySelect *// The field to be queriedFrom table// Table with child and parent contact IDSStart with selfid = id// Specify a startid (the Field name is
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