From the course: Quick Start Guide to SQL
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Data types
- [Instructor] Let's learn about the various data types we can define for columns and tables. We will also understand which data type to use in which scenario. A data type specifies the kind of values that are inserted into each column. First one is VARCHAR2. We use this when we have character data, but with variable length. The size specifies the maximum number of characters that can be given in that column. Minimum size can be one and maximum size can be 4,000. The size has to be specified. Next one is CHAR. This is used again for character data but the length fixed. Minimum size is one and maximum size is 2000. If the size is not specified it takes the default value as one, we generally use VARCHAR2 when we are uncertain about the number of characters in the data that is entered in the table. Number is for numeric data with variable length. P stands for precision, and S stands for scale. P specifies the number of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.