SQL (ORACLE)

Source: Internet
Author: User

Query Database encoding:

SELECT * from Sys.nls_database_parameters;
SELECT * from Sys.nls_session_parameters;

Replace function:

Update Table 1 T set t. Column 1=replace ((select column 1from table 1 A where a. primary key column =t. Primary key column), '/', '-') solves our problem.

Modify Table Structure

Modify Table Name:
ALTER TABLE name rename to new name
To add a field:
ALTER TABLE name Add field name fields type
To delete a field:
ALTER TABLE table name drop column field name
To modify a field:
ALTER TABLE name rename column original field name to new name;

Modify the field type (provided that no data is in the table)
ALTER TABLE name modify field name new type;
Example: String deletecolumn= "ALTER TABLE t_user drop column sname";


Sqlplus Single statement length cannot exceed 2499

Create a user, assign permissions to
Http://www.cnblogs.com/shlcn/archive/2011/07/21/2112879.html


1) View the allocation of each table space
Select Tablespace_name, sum (bytes)/1024/1024 from Dba_data_files Group by tablespace_name Order by Tablespace_name;

2) View the table space idle situation
Select Tablespace_name, sum (bytes)/1024/1024 from Dba_free_space Group by tablespace_name Order by Tablespace_name;

3) Change data table size (10G)
ALTER DATABASE datafile '/HOME/ORACLE/ORADATA/AA.DBF ' resize 4096m;

SQL (ORACLE)

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.