What are the operations performed on the DB2 database?

Source: Internet
Author: User

This article mainly describes the operations performed on the DB2 database, including getting the first 10 records, modifying the field length, and adding fields ), the following describes the operations on the DB2 database, including the top 10 operations, modifying the field length, and adding the field content. We hope this will be helpful for your future study.

Document category: Database

DB2 takes the first ten records, DB2 modifies the field length, DB2 adds the Field Method

DB2 takes the first 10 records

 
 
  1. DB2 => select istop from news where id =370 fetch first 10 rows only  

DB2 Modify Field Length

 
 
  1. DB2 alter table DB2admin.config alter cvalue set data type varchar(255)   
  2. DB2 => alter table news alter AUTHOR set data type varchar(250)   

The DB20000I SQL command is successfully completed.

 
 
  1. DB2 => describe table news  

Add a field in DB2

 
 
  1. alter table table_name   
  2. add column column_name data type varchar(250)  

The above content is the introduction of taking the top 10 DB2 database operations, modifying the field length, and adding fields). I hope you will get some benefits.

The above content is the introduction of taking the top 10 DB2 database operations, modifying the field length, and adding fields). I hope you will get some benefits.

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.