Oracle query 070430

Source: Internet
Author: User
The problem is: change the name of the employee in the employee information table to another one. For example, change Zhang to Wang and only change the name without changing the name:
Update table name set field name = 'King' | substr (field name, 2, length (field name) where field name like 'sheet % ';
The table name is Recv, which contains the field no so that the no field is incrementing:
Create Sequence
Start with 1
Increment by 1;
Query the types of all user tables and their corresponding fields:
Select * From user_tab_columns;
Oracle uses SQL to query the remarks of table field columns:
Select comments
From user_col_comments
Where table_name = 'dept'
And column_name = 'deptno ';
Use an SQL statement to obtain the table structure of the specified Oracle table: 1. Select * From all_tab_columns where owner = 'use1' and table_name = 'B '; 2. DESC table name 3. Select column_name as fieldname, data_type as type, data_length as size, nullable as isnull from user_tab_columns where table_name = 'tablename'
Query the field type of a column in a table in the User table in the 'sale el' column:
Select * From user_tab_columns where table_name = 'dept' and column_name = 'deptno ';

Related Article

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.