Note: [Oracle problem set] refers to the problems and solutions encountered by bloggers during database operations.
Statement execution: indicates the database operation process.
Error: Indicates An error occurred while operating the database.
Error cause: indicates the cause of the error.
Solution: indicates the solution to the error.
Related Knowledge: indicates the knowledge related to this topic.
========================================================== ==============================
Label:Get ready:CREATE table t (x int,y int); Usage 1:Modifying a column's data classALTER TABLE t modify column y nvarchar (32); Usage 2:Add a column to a tableALTER TABLE t add column z int; Usage 3:To delete a column in a tableALTER TABLE t drop column Z; Usage 4:Change a name to a columnALTER TABLE t change column y w int; this guy wants to make a special statement. Not only can the column name be changed, but also the data type of the column can be changed. It's not just a change of fac
don't need 10 minutes here.Please make a partition of the table
7 Floor:
Sort_area_size = 655350Sort_area_retained_size = 655350Set these two numbers to db_block_size to reduce fragmentation
8 Floor:
Also, opening the sort_area_size at the session level is large enough to mean that I've put it in the init fileSort_area_size increased. According to my current demand, how much appropriate.Also do not make a big adjustment in Init, Sort_area_size is to each session ofIf you are running out of s
Label:1: Delete ColumnsALTER table "table name" DROP "column name"2: Add columnsALTER table "table name" ADD "column name" INT not NULL COMMENT ' comment description '3: Modify the column type informationALTER table "table name" Change "column Name" "New column name (you can use the same name as the original column)" BIGINT not NULL COMMENT ' comment description '4: Renaming columnsALTER table "table name" Change "column Name" "New column name" BIGINT not NULL COMMENT ' comment description '5: R
1: Delete ColumnsALTER table "table name" DROP "column name"2: Add columnsALTER table "table name" ADD "column name" INT not NULL COMMENT ' comment description '3: Modify the column type informationALTER table "table name" Change "column Name" "New column name (you can use the same name as the original column)" BIGINT not NULL COMMENT ' comment description '4: Renaming columnsALTER table "table name" Change "column Name" "New column name" BIGINT not NULL COMMENT ' comment description '5: Renamin
Label:The teammate gave me the statement to modify the data. Always fails to execute. I wonder. For example:Look carefully at this column, and there is nothing special. such as:But it does have a constraint: ' df__his_drug___all_i__04e4bc85 '. Why do we have this constraint???When I finally searched this article, I understood. Because the column ' All_inventory_state ' is assigned a default value when it is created. That's why we have this constraint.Reference:http://blog.csdn.net/rodjohnsondoct
The ALTER user statement has an optional replace statement that is used to enter the original password after the password validation function is started.
By default, the user does not need to provide the current password to modify his or her password:
Sql> create user test identified by test;
User has created.
Sql> Grant connect to test;
The authorization was successful.
Sql> select * from Dba_profiles;
Profile Resource_name RESOURCE LIMIT
---
View database show databases;The new Database command creates the library name.Select database Use 2016test;CREATE TABLE: Create table table name (Field ....);Auto_increment Self-incrementPrimary KEY Primary KeyView table structure: Describe table nameShow Table:Inserting dataTabularDelete Field Name:ALTER TABLE name drop field name;Add Table fieldALTER TABLE name add field name type;To modify a table field:ALTER TABLE indicates the new field name of the Change field name new field type;modifyin
to add columns to a table, use the following syntax:ALTER TABLE TABLE_NAMEADD COLUMN_NAME datatypeTo delete a column from a table, use the following syntax:ALTER TABLE table_name DROP COLUMN column_nameTo change the data type of a column in a table, use the following syntax:ALTER TABLE table_namealter COLUMN column_name datatypeIf you want to add a column to a table that has already been built, you can use the following example:ALTER TABLE t1 add column addr varchar (a) not null;This statement a
Tags: Post LTE class SOF AC extern data nbsp authorizedError:The ALTER ASSEMBLY for assembly ' Sqlservertime ' failed because the assembly ' sqlservertime ' is not authorized (Permission_set = external_access). An assembly is authorized when one of the following two conditions is met: the database owner (DBO) has EXTERNAL access ASSEMBLY permissions, and the trustworthy property of the database is open;The logon name for the certificate or asymmetric
Tag: User DDR termination process resource Release lock DBA system use UPDTerminate process mode by operating system mode and Oracle through the For Update lock table--The query needs to terminate the process, including the operating system processSelect Proc.spid,Sess.sid,sess.serial#,Lo.oracle_username,Lo.os_user_name,Ao.object_name,Lo.locked_modeFrom V$locked_object Lo, dba_objects ao, v$session sess,v$process procwhere ao.object_id = lo.object_idand lo.session_id = Sess.sidand Sess. Paddr=pr
Label:1: Delete ColumnsALTER table "table name" DROP "column name"2: Add columnsALTER table "table name" ADD "column name" INT not NULL COMMENT ' comment description '3: Modify the column type informationALTER table "table name" Change "column Name" "New column name (you can use the same name as the original column)" BIGINT not NULL COMMENT ' comment description '4: Renaming columnsALTER table "table name" Change "column Name" "New column name" BIGINT not NULL COMMENT ' comment description '5: R
Reproduced1: Delete ColumnsALTER table "table name" DROP "column name"2: Add columnsALTER table "table name" ADD "column name" INT not NULL COMMENT ' comment description '3: Modify the column type informationALTER table "table name" Change "column Name" "New column name (you can use the same name as the original column)" BIGINT not NULL COMMENT ' comment description '4: Renaming columnsALTER table "table name" Change "column Name" "New column name" BIGINT not NULL COMMENT ' comment description '
Exec sp_msforeachtable@ Command1 ='Declare @ o sysname, @ n sysnameSelect @ o = ''? '', @ N = stuff (@ o, 1, charindex ('']. [FG _'', @ O) + 6, ''fgjzw _''), @ N = left (@ n, Len (@ n)-1)Exec sp_rename @ o, @ n ',@ Whereand = 'and O. name like ''fg _
1. Primary Key constraints:To add a primary key constraint to a column, this column must meet the condition that it is left empty.Because of the primary key constraint: A column is restricted, and the constraint is (not empty, not repeated)The
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.