BYTE

Any digital data can be stored in a BYTE data type. The BYTE data type stores information unstructured, these can be program modules, pictures, sounds and any other information that can be stored in digital form.

 

You can use the LIKE keyword within the DEFINE statement to define a variable like a database column of the BYTE data type.

 

The value of BYTE type is limited to 2 gigabytes, but it can also be limited by the storage capacity of your system.

A variable of this data type can be used:

After a variable of BYTE data type has been declared, it is necessary to use LOCATE statement to tell the program, where the information for this variable is located. A column defined as BYTE type can be assigned to a BYTE variable completely or partially. If you want to assign only a part of the contents of the column to a BYTE variable you’ll need to specify the beginning and the end of the part you want to assign in bytes using square brackets as delimiters – variable [m, n]. E.g.:

SELECT image1 [1,100] INTO my_pic FROM catalogue

Here m and n are the coordinates of the first byte of a picture from which the part you want to assign begins and the last byte of the piece. The above code will select first 100 bytes of the specified picture image1 into my_pic variable.

You can use these methods to manipulate variables of BYTE data type:

Restrictions applied to BYTE

There are a number of restrictions that should be kept in mind while using BYTE data type:

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.