oracle database 19.20 c the size of the column will be reserved for 4000 char immediately or it will reserve as much they need?
i tried to change all varchar2 columns of some table to be 4000 to avoid modifying the size later.
oracle database 19.20 c the size of the column will be reserved for 4000 char immediately or it will reserve as much they need?
i tried to change all varchar2 columns of some table to be 4000 to avoid modifying the size later.
Copyright © 2021 Jogjafile Inc.
From my point of view, absolutely wrong approach. Why would all strings be stored into
(var)char(4000)? (withcharbeing even worse, as you'd reserve 4000 characters, fixed, with all values right-padded with spaces up to whole column length.)First name - 4000 characters? Do you know anyone who has that long first name? Phone number? Sex?
Shortly: plan data model; think about data you're about to store; wisely choose datatypes (and their length).
As of program units you'll write: variables, that refer to columns, should inherit their datatype. For example:
because if it turns out that you didn't guess it right initially, you'd just modify column length, but all procedures would just work, without you having to modify a single bit of code.