What are the basic data types in oracle
What this article shares to you is about which basic data types in oracle, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Char: a fixed-length string, followed by a space if the character does not have a defined length.
Varchar2: variable length string.
You need to pay attention to the difference between these two types, otherwise there will be some pits in subsequent applications. The following screenshot is a table I defined, in which A field is defined as char (10), B field is defined as varchar2 (10), and the length of both fields is 10. I insert the same character into the table and calculate the length of these two fields respectively. What will I find?
Script:
Create table t_filed_test
(
A char (10)
B varchar2 (10)
);
Insert into t_filed_test values ('abc','abc')
Select a dint bjorn length (a) lame a dint length (b) lame b from t_filed_test
These are the basic data types in oracle, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.