Oracle storage functions
Set serveroutput on;-- // There can be no parameters and return is required-- // You do not need to specify the precision for parameters and return types.Create or replace function hello(P_name varchar2)Return
Assume there are two tables, table A and table B. Table A has the field ID and name, and table B also has the field ID and name. The field name in table A is empty. You need to assign the value of the field name in Table B to Table. Update a set a.
Article 2: publish a simple webapp example.
The simplest thing is helloworld. Let's use servlet to output a hello World and release it to the Solaris.
The following example assumes that you have mastered the servlet Development Method in JB, and
Learning oracle is very powerful.I want to use it as the database of my project, but I don't know how to import/export the database.
The following imp command is used to import/export data.
Import impOracle import utility allows you to extract data
Share with you
Use this script to export the table structure to the./tab248_20091217. SQL file.
Set colsep''
Set trimspool on
Sets long 90000
Set linesize 120
Set pagesize 2000
Set Newpage 1
Set heading off
Set term off
Spool./tab248_20091217.
Create tablespace ewmsdb datafile 'e:/ewmsdb/ewms. dbf' size 100 m autoextend on next 10 m maxsize unlimited extent management local;
Create user 'ewmsdb' identified by 'ewmsdb' defalut tablespace ewmsdb;
Create user ewmsdb identified by ewmsdb
1. Search for redundant duplicate records in the Table. duplicate records are determined based on a single field (peopleid ). Select * from peopleWhere peopleid in (select peopleid from people group by peopleid having count(Peopleid)> 1)
2. Delete
Syntax:Select *From table nameWhere condition 1Start with condition 2Connect by prior current table field = cascade table FieldThe start with and connect by prior statements complete recursive records to form a tree structure, which can be used in
Select O. name, C. name, Co. comment $ --- indicates the field name and field comment from sys. OBJ $ o, sys. col $ C, sys.com $ cowhere O. owner # = userenv ('schemaid') and O. type # In (2, 4) and O. OBJ # = C. OBJ # and C. OBJ # = Co. OBJ # (+)
This is a simple function, that is, using auto-increment columns and triggers.
1. First create a simple table users
-- Create Table userscreate table system. users (userid varchar2 (20) primary key, username varchar (20) not null, userpassword
-- View the Oracle Instance name, host name, version select instance_name, host_name, version from V $ instance; -- view the details and digits of the Oracle version, other component Information Select * from V $ version -- view the database server
Background: Change the host name from dbt_a to dbta.
Centos5.5 oracle11gr2
You need to modify three files.
[root@DBTA ~]# vi /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1
PHPStrtotime ("12:25:33")-strtotime ("6:04:56"); // second gapMySQLDatediff ("D", date1, date2) // The number of days difference between the two dates"D" day "M" month "YYYY" year "H" Hour "S" second "ww" WeekDate1 is the start timeDate2 is the end
1. Install Oracle VM virtualbox at http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html. I use version 4.0.
2. refer to the help document of the virtual machine to create a virtual hard disk. Note that when selecting
1 Oracle user
Oracle Installation will automatically generate sys and system users:
(1) A sys user is a super user with the highest permissions, sysdba role, and createdatabase permissions. The default password for this user is change_on_install.
(2
If your machine already has an Oracle database, it is very simple. navicat can be directly connected to Oracle.
According to the official documents of navicat, you only need to download the instance client of oracle. This package only contains some
I1 main components of Oracle ArchitectureThree main components of Oracle architecture:1. File: five files that constitute the database instance (parameter files, control files, data files, temporary data files, and redo log files)2. system global
The following describes the general process of using JDBC:
1. Load the driver class of a database, usually using class. forname ("Driver Class Name");
2. Connect to the database connection con = drivermanager. getconnection (URL, username, password )
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