SQL Query to alter column size

SQL Query to alter column size

In this article, we will find out about the property of section and afterward we will change the pre-characterized size of segment.

The Columns can have various properties. These properties characterize pretty much everything the value of that section can have. Presently, the information sort of a segment can be of a kind which has maximum breaking point to it. For example, type varchar has a maximum breaking point, which discloses to us that what number of characters the field can have.

Presently the issue emerges when we have set as far as possible and needs to transform it. To settle it, utilize the ALTER watchword and discloses to it which segment or field you need to change. This equivalent like changing the name or sort of the section.

You ought to consistently characterize the properties unmistakably during the making of table in light of the fact that once the database builds, it will be hard to monitor everything.

Table (representative) having three fields and four information in it,

    Id		Name		Address

    100		Aman		Mumbai
    200		Arun		Pune
    300		Karan		Delhi
    400		Aman		Mumbai

As consistently we have our representative table with three segment and four information pushes in it and now we have to adjust one of our segment’s pre-characterized size, assume the section we have to change names and afterward we can simply take the segment name and make an adjust table question with alter segment and give it another size.

Query:

ALTER TABLE employee 
MODIFY COLUMN 'name' VARCHAR(100) DEFAULT NULL;

Output:

SQL Query to alter column size

Recent Posts

error: Alert: Content is protected!!