Get the App
SLTechnology News&Howtos  ›  Database  › 

Modify the length value of a table field

Shulou Source: shulou.com Published: 2022-06-01 22:40:26 11月07日 Update

Syntax:

Alter table alter column new type name (length)

The field length has changed from varchar (max) to varchar (3000).

Alter table Engage_Job_JianLi alter column emp_gzjl varchar (3000)

Select * from emp_certificate

-- back up the table first

Select * into emp_certificate0620 from emp_certificate

-- modify the length of the field

Alter table emp_certificate alter column Cert_code varchar (30)

Tags: Length field backup type syntax Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Apple macOS Redmi Docker