RUVIDEO
Поделитесь видео 🙏

What are Datatypes in SQL | SQL Developer | with Example | Most Asked Interview Question

0:00 What is DataType in SQL ?
0:35 Example of Different DataTypes
1:22 What is TIMESTAMP in SQL datatype
1:48 What is CLOB in SQL datatype
2:23 What is BLOB in SQL datatype
2:40 What is BOOLEAN in SQL datatype
2:53 What is INTERNAL in SQL datatype
3:12 What is XML in SQL datatype
3:27 What is ARRAY in SQL datatype
3:41 What is JSON in SQL datatype
4:02 What is FLOAT in SQL datatype
4:14 What is BINARY in SQL datatype


In SQL, a data type is a classification that defines the type of data that a column or variable can hold. Each data type has a specific set of characteristics, such as the type of values it can store, the amount of memory it occupies, and the operations that can be performed on it.

When you create a table in SQL, you must specify the data type for each column. This helps the database system to store and manage the data efficiently. It also ensures that the data is stored in the correct format and can be accessed and manipulated correctly by SQL commands.

Here's an example of how you can specify the data type for a column in a table:

CREATE TABLE employees in to bracket
employee id INTEGER PRIMARY KEY,
name VAR CHAR in bracket 50 NOT NULL,
hire date DATE NOT NULL,
salary NUMERIC in bracket 10 comma 2
In this example, the employees table has four columns: employee id, name, hire date, and salary. The employee id column is of type INTEGER and is the primary key for the table. The name column is of type VARCHAR with a maximum length of 50 characters, and the hire date column is of type DATE. The salary column is of type NUMERIC with a precision of 10 and a scale of 2, which means it can store numeric values with up to 10 digits, including 2 digits after the decimal point.

Here are some additional data types that are supported by SQL:

TIMESTAMP: This data type is similar to DATE, but it also includes a time zone offset and a fractional second precision.
The TIMESTAMP data type is often used to store the time when a record was created or modified in a database table. It is also useful for storing timestamps for events or transactions that need to be recorded with high precision.

CLOB: This data type is used to store large character strings, up to 4GB in size.

The CLOB data type is often used to store large amounts of unstructured text data in a database table. It is also useful for storing data that may need to be accessed and manipulated using SQL commands and functions.
Real life application of clob can be in analyzing social media data,historical documents or records
in this example The content column is of type CLOB and stores the content of the document as a large character string.

BLOB: This data type is used to store large binary objects, such as images, audio files, or video files up to 4GB in size.
here, The content column is of type BLOB and stores the content of the image as a large binary string.

BOOLEAN: This data type is used to store logical values, either TRUE or FALSE.
here, The available column is of type BOOLEAN and stores a value indicating whether the product is available for sale.


INTERVAL: This data type is used to store a duration or time interval. It can be used to store a fixed or variable-length period of time, such as years, months, days, hours, minutes, or seconds.
here The duration column is of type INTERVAL and stores the duration of the event as a time interval.


XML: This data type is used to store Extensible Markup Language (XML) documents or fragments.
here, The address column is of type XML and stores the customer's address as an XML document.


ARRAY: This data type is used to store a collection of values of the same data type. It is similar to a table with a single column.
here, The items column is of type ARRAY and stores a list of items that were ordered as an array of values.


JSON: This data type is used to store JavaScript Object Notation (JSON) data. JSON is a lightweight data interchange format that is used to transmit data between systems.
here, The items column is of type JSON and stores a list of items that were ordered as a JSON object.


FLOAT: This data type is used to store floating-point numbers with a variable precision.
here, The price column is of type FLOAT and stores the price of the product as a floating-point number

BINARY: This data type is used to store fixed-length binary strings.
here, The content column is of type BINARY and stores the content of the image as a binary string.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «What are Datatypes in SQL | SQL Developer | with Example | Most Asked Interview Question», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.