Instance:
Create a userinfo database table:
Of course you can write it like this:Drop table userinfoCreate Table userinfo(Englishname varchar (30 ),Chinesename varchar (30 ),Sex varchar (10 ),Age int,Birthplace varchar (100 ),Birthdate date
1. If
If the Oracle tnslistener service is not started
Net start oracleoradb10g_home1tnslistener
2. Shutdown
Sqlplus sys/oracle10 @ tstdb as sysdba @ C:/stop.txt
3. startup
Sqlplus sys/oracle10 @ tstdb as sysdba @ C:/start.txt
The content
As shown in the following figure, Table A is an existing table in the database, and table B is the table to be copied and created based on table:
1. copy only the SQL statements of the Table Structure
Create Table B as select * from a where 1
// Restart the server reboot
Telnet 172.21.1.11
Enter User Name
Enter Password
Su-Oracle
Export oracle_sid = orcl // database instance name
LSNRCTL start // start the listener
Sqlplus/nolog // open sqlplus
Conn/As sysdba
Startup // start
In Java Development, we often use the long type to save the time for convenience. currenttimemillis () or Java. util. date. gettime (). The value is the number of milliseconds between the current date and the 1970-01-01;
However, in Oracle,
Synonym Synonyms
Synonyms (Oracle database only)Such a query statement always exists:Select sysdate from dual; (Query System Information)I have always stressed that dual is a virtual table. Although it is a virtual table, it isWhere is it
Oracle tablespace Design
Tablespace design principles:
1. assign different tablespaces to tables and indexes.
2. assign different tablespaces to the formal and historical tables to improve data security.
3. assign a separate tablespace for the big
Oracle storage hierarchy Overview1) A database consists of one or more tablespaces.2) a tablespace consists of one or more files. The files that make up the tablespace can be various files in the file system, and the tablespace contains segments.3)
Start DatabaseIn.Use Oracle to install the user to log on to the host and start database and service listening. The operations are as follows:[Ora @ localhost ora] $ sqlplus "/As sysdba" SQL * Plus: release 9.2.0.4.0-production on Sun Mar 22 23:55:
Drop table test;
Select count (*) from test;-- Create a test tableCreate Table Test(ID number (9 ),Nick varchar2 (30));
-- Insert Test DataBeginFor I in 1 .. 100000 LoopInsert into test (ID) values (I );End loop;Commit;End;
Select * from test;
--
MySQL, sqlserver, and Oracle databases are queried by page
The database implements the paging query method.I,MySQL database paging QueryThe implementation page of MySQL database is relatively simple, and the limit function is provided.
1. Check the table space name and size. Select T. tablespace_name, round (sum (Bytes/(1024*1024), 0) ts_sizefrom dba_tablespaces T, dba_data_files dwhere T. tablespace_name = D. tablespace_namegroup by T. tablespace_name; 2. view the names and sizes
First, popularize the basic concepts:
PL/SQL is a programming language that combines Procedural language and Structured Query Language (SQL.
The PL/SQL block corresponds to a small piece of code.
Applicable instructions:
1. Sometimes you may need to
1. Open "Control Panel", select "add Hardware", and then select "Next ".
2. Select "yes". I have connected the hardware and then select "Next ".
3. Select "Add a new hardware device" from the installed hardware list and select "Next ".
4. Select
Http://database.51cto.com/art/200703/41790.htm
First, the table below describes the ing relationship with the DB2/400 data types, which is a one-to-many relationship. The specific ing relationship should be analyzed for specific issues.
Note:
The
In some cases, you need to relocate multiple ORACLE data files and log files or migrate them to new partitions or locations, such as insufficient disk space or special requirements. In this case, you can migrate multiple data files or log files in
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