Oracle Database Learning Note 3

SELECT * from Stuent;ALTER TABLE student Add Stu_card char (18)--PRIMARY KEY constraint: Non-null, unique PRIMARY keyALTER TABLE student ADD constraintPk_stuid primary KEY (STU_ID)--Check the constrained check ck_xxxALTER TABLE student ADD

Uninstalling the Oracle Database

Uninstall steps: 1. Stop all Oracle Services2. Running Oracle Universal Installer uninstalling Oracle3. Modify the registry to remove Oracle-related information? Oracle software has key-value hkey_local_machine\software\oracle? Oracle Service

Easy UI MyBatis Springmvc querying the database with the time input from the foreground Oracle

The database type is the actual value of date type such as: 2017/7/11 14:24:19Solution IdeasForeground UI time to the day after tomorrow is string not converted directly to receive time string in MyBatisForeground UI code easy UI Time

JDBC Link Oracle Database

Package Test;import java.sql.*; public class Jdbc_test {//ORCL is the database name in the Oracle database, and localhost indicates that the Oracle database connecting to the native//1521 is the port number of the connection private stat IC

Oracle SQL sample

To create a table:1 --To Delete a table:2 --Delete the existing table with the same name before creating the table, ensuring that you can create a success. 3 --but this is a very dangerous operation and it can be very bad to delete a table that

Oracle Database Operation statements

Commonly used Oracle database operation statements, the following is for reference only:First, query1. Query the number of all data bars for a database table that is greater than a certain dateSelect COUNT (*) from Alarm_log t where

Oracle (Create data file)

--Create a data fileCreateTablespace--Create a table space and create a data file at the same timeCreate TemporaryTablespace--Create a temporary data file while creating a temporary table spaceAlterTablespace ...AddDataFile--to add a data file to a

Getting Started with Oracle table spaces and tables instructions

Oracle database-Common operations directivesView port number DirectivesNetstat–aClear screen:Sql> Clear Scre; SQL> Host CLS;Table SpaceCREATE TABLE Spacesql> Create tablespace tc20 datafile 'e:\tc20_data_dbf' size 20m autoextend on Next 5m maxsize

Oracle view table structure and annotations

To view the table structure:See field names and data typesSELECT * FROM cols WHERE table_name=upper (' table_name ')To view the primary key:SELECT * from user_constraints where constraint_type= ' P 'and Table_name=upper (' table_name ')Other than

Use of Oracle Functions (III)

--function1.oracle self-to_date,to_number standard function2. Custom Functions--Custom Function syntax1 CREATE OR REPLACE FUNCTIONfunction_name2 [(PARAMETERS [MODEL]datatype ...) ]3 RETURNDataType is| as4 [local_variable_declarations, .....]5 BEGIN6

Oracle modifies field names, field lengths

Statement:TableName Oldcname Newcname; --Modify field namestableNameModify (cloumnname data type ); --Modifying data typesFor example:1. Create a table:CREATE TABLE Student (ID VARCHAR2 (+) primary key,NameVARCHAR2 (8) NOT NULL,Age Number);2. Modify

Oracle creates the self-increment ID table and the use of triggers

1. Create a normal user tableCreate Table Demo ( intnotnull, varchar(ten), varchar (default'123' ,primary Key (ID))2. Create a sequence sequenceCreate sequence Seq_demo by 1-Self-increment 1 with 1--Start value 1 Nomaxvalue--No

Oracle vs. MySQL Current time comparison

Selectp.id,p.order_num,p.image_url,p.url,p.image_topic, P.is_download, P.big_image_url, P.begin _time,p.end_time fromPage_index_img PwhereP.is_delete='N' andP.image_type=7 andP.url=app andNow

Oracle Paging Query

Oracle Paging query statements make one of our most commonly used statements, as described below, for the use of Oracle paging query statements, and if you are interested in this aspect, you may wish to take a look.Oracle Paging query statements can

Oracle Modified table space is automatically extended

1. Benefits of Automatic data file expansion1) does not appear because there is no remaining space available to the data cannot be written2) Minimize man-made maintenance3) can be used in databases where important levels are not very large, such as

Oracle trunc () function

The 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

Oracle Second step creates table spaces, users, authorizations

windows+r→ type Sqlplus, enter the installed Oracle Database Super Administrator account password to log in. Show:Success.To create a table space:To create a user and default tablespace:Authorize the user to create a database operation:Code:sql>

Oracle View user Information

1. View All Users:SELECT * from Dba_users;SELECT * from All_users;SELECT * from User_users;2. View user or role system permissions (System permissions that are directly assigned to a user or role):SELECT * from Dba_sys_privs; SELECT * from

DML Operations on table content for getting started with Oracle

Management of Oracle Tables--Adding dataInserting data into a table using the INSERT statementInsert Data basic syntax:INSERT into table[(column [, Column ...])] VALUES (value [, value ...]);insert into table name [(column name [, column Name 2 ...])

Summary of merge into usage in Oracle (reproduced)

Summary of merge into usage in Oracle (Source: http://www.cnblogs.com/dongsheng/p/4384754.html)causes :Some time ago, because it involves a table of big data operations, to make additions and deletions at the same time, I and master think a lot of

Total Pages: 2147 1 .... 1589 1590 1591 1592 1593 .... 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.