Create databases/tables in batches using Linux shell
The Shell script is as follows:
# Create database and table
HOST ='Localhost'
PORT ='123'
USER ='Root'
PWD =''
DBNAME ='Top123'
TABLENAME ='Gametop800'
Mysql_login =''
Mysql_create_db =
You can use the decode function to convert columns in Oracle:
If there is A student Table:
ID
NAME
SUBJECT
SCORE
1
Zhang San
Chinese
90
2
Zhang San
Mathematics
80
3
Li Si
Chinese
1. Select the most efficient table name order
The SQL parser processes the table names in the FROM clause in the order FROM right to left. If the FROM clause contains multiple tables, you must select a table with the least number of records as the
OracleCSService cannot be started:
1. for network connection problems, check the priority of public and private NICs; and check whether the network connection is normal
2. Shared Disk: Check whether the drive letter is set and whether the shared
Oracle locates 1 billion data records:
/** The app queries the table and partition where the ID is located by ID, and locates the Stored Procedure for the first 100 table partitions in one table.* Parm id ID* Return table_name table name, par_name
This article does not compare Oracle Spatial with ST_Geometry. For details about the comparison, refer to: here, the data structure and performance comparison are clearly described.
In fact, this document shows that OracleSpatial in ArcGIS is
A Date Field in the database has the following data. The SQL statement is as follows:
Select age, money, birthday from userinfo
Observe carefully that the date field has two formats, one with time and the other without time. In the
I have been using Mysql and Oracle databases for so many years. This time I have to use the C/C ++ language to call the Oracle stored procedure, so I am too lazy to look at the OCI API, I went online to find someone else's encapsulated library, and
The Orcale Data Warehouse command uses exp.exeto restore the Data Warehouse command imp.exe
I. Back up the database -- exp
Format: exp username/password @ database owner = owner file = C: \ xxx. dmp
Eg1: the database TEST is completely exported.
RANK () OVER ([query_partition_clause] order_by_clause)
DENSE_RANK () OVER ([query_partition_clause] order_by_clause)
You can group and sort the results set of the same group fields by specified fields,
Where partition by is the grouping field,
In actual application, multiple insert statements may be executed at a time. I know two ways to share with you:
1. Write the statement block in tools such as PLSQL between begin end, for example:
Begin
Insert into table values (....);
Insert
When the Sequence is defined, if the cache is used, a Sequence jump occurs when the database is closed or down.
To solve the sequence disconnection number in the ADF program, make sure that the Oracle database does not generate a disconnection
The shared pool is mainly composed of data_dictionary that saves the data dictionary and the library cache that saves the SQL and PL/SQL code and execution plan. It also includes several other buffers for different system features and technologies,
Normal equal connections:Select * from a, B where a. id = B. id;This is an internal connection.For external connections:"(+)" Can be used in Oracle, and 9i can use LEFT/RIGHT/full outer join.Left outer join: LEFT OUTER JOINSELECT e. last_name, e.
Some students need to insert images into the table in their projects. The following provides a method for your reference:
1. Create a table. Note: The columns to insert images must be defined as BLOB.
Create table image_lob (t_id varchar2 (5) not
Exp_p.sh
#! /Bin/sh
#$1 generate the storage path of the dmp File
If [-d "$1"]; then
Echo "" $1 "exist"
# The user name/password generated file name is automatically generated based on the date of the day, for example, 20111128.dmp
Exp
1. Start the CSS service first
# Cd/db/Oracle/product/bin/
#./Localconfig addSuccessfully accumulated necessary OCR keys.Creating OCR keys for user 'root', privgrp 'sys '..Operation successful.Configuration for local CSS has been initialized
Adding
A table is the most basic logical unit for storing data in a database. It consists of rows and columns. Oracle divides the table into heap table and index organization table (IOT) and temporary table (temporary table) This section briefly introduces
1. imp user name/password @ Database Name (SID) file = "dmp file path" fromuser = User Name (from which user to export) touser = to which user example to import:
Imp public_hmis/public_hmis @ rldm file = d: \ hmis. dmp log = d: \ hmis. log fromuer =
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