MLSLABEL Oracle datatype - sql

Where can practically use this type?
What is the MLSLABEL Oracle datatype?
This theme is very old so it can have practical use of this type?

MLSLABEL : The Oracle PL/SQL datatype MLSLABEL is used to store an
operating system label in binary format. It is used for Oracle Label
Security (which was earlier known as Trusted Oracle MLS RDBMS). The
maximum precision for MLSLABEL column is 255 bytes; its Datatype Code
is "105".
http://psoug.org/definition/MLSLABEL.htm

Related

Postgresql REAL type conversion separator

Postgresql cannot automatically convert float point data that comes from remote table in format "1,1"
I am trying to connect db2 and postgresql using some fdw extensions. Now I am using odbc_fdw, but odbc always return float types in format "1,1" and postgresql can only use point as delimiter. may be any postgresql settings or odbc configs?
SELECT CAST('1,01000000E+1' as real);
Error code 22P02. Wrong syntax for type real
I expect to automatically convert strings like "1,1" to float using cast. I think without this I won't be able to user foreign tables with float data types
you could do
SELECT string_to_array('1,01000000E+1', ',')::real[]

SQL cast target types: standardized?

SQL function
cast(expression as type):
It is ANSI standard. Is the type standardized? what types are allowed? Are they different from database to database?
Looked at the MySQL and others. MySQL has signed/unsigned, others has INT.
CAST() is ANSI standard. Off the top of my head, ANSI data types are things like:
DECIMAL/NUMERIC(scale, precision)
VARCHAR()/CHAR()
DATE/TIME/DATETIME/INTERVAL
DOUBLE PRECISION/FLOAT
BIGINT/INT/SMALLINT
MySQL changes the syntax a bit. So, UNSIGNED and SIGNED are used instead of INT. And CHAR is used for all the character types. Other databases have their own modification for CAST(). For instance Google BigQuery uses string instead of the character types.

DB2 database and db2_compatibility_vector

I created database with
DB2_COMPATIBILITY_VECTOR = ORA
it should include NUMBER_COMPAT and VARCHAR2_COMPAT set to ON
http://goo.gl/tHSDM8
But when I try to create table with number column like NUMBER(38) it says that number is too long.
It is also case with definition of variable in pl/sql package - varchar2(32767).
Thank you in advance
There are certain differences in how these data types are supported between Oracle database and DB2 -- they are clearly explained in the documentation.
NUMBER(x) maps to the DECIMAL(x) data type, for which the maximum precision is 31. If you need more, use DECFLOAT(34).
The maximum size of VARCHAR data type (for which VARCHAR2 is just a synonym) is 32672 bytes.

which data type can save bangla Language in sql server?

I want to save bangla Language in sql server. Using which data type I can Do it in sql server 2005 or sql server 2008.
I tried varchar and varbinary type but it cannot save bangla Language.
How is it possible?
You're using SQL_Latin1_General_CP1_CI_AS for your collation, which is suited for the Latin character set (ISO-8859-1). To store characters fromother character sets, you can use the NVARCHAR() which can store the full Unicode range, irrespective of collation - this does mean it will need to be treated as NVARCHAR() all the way, as quoted constants (e.g. N'বাংলা Bangla'), as the data types for parameters to stored procedures, etc.

What is the standard SQL type for binary data?

I have a function which maps java to SQL types.
As I want to store binary data, is there any type defined by the SQL standard which I can use both in PostgreSQL and hsqldb?
The SQL 92 standard does not define a binary type. PostgreSQL has a bytea type, hsqldb has a binary type.
For a very portable (if not efficient) solution, convert the binary to base64, and store it in a string.
BINARY and VARBINARY are defined by the the SQL Standard. The Standard is currently at SQL:2011 (after 92, 1999, 2003 and 2008). HSQLDB supports all the core data types defined by the Standard.
The PostgreSQL BYTEA is similar to VARBINARY. You can define the BYTEA type in HSQLDB as a VARBINARY type with a large maximum size:
CREATE TYPE BYTEA AS VARBINARY(1000000)
SQL has supported binary types since 1999: [https://mariadb.com/kb/en/sql-data-types/]. Vendors have had over a decade to add support for binary types, and most SQL databases do.