Questions tagged [virtual-columns]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
23 views

Column with Default value as Sum of TIMESTAMP

I have a table which has 2 columns ( JobDate , RecordTime) -------------------------------------- JobDate | RecordTime | SumCol -------------------------------------- 2019-07-20 | 2019-07-...
0
votes
3answers
776 views

How to use column alias to calculate other column value

My query is SELECT (`house_rent`+`conveyance`+`medical`+`dearness`+`others_allowances`) AS earnings ,(`income_tax`+`pro_tax`+`emp_state_insu`+`absence_fine`+`others_deductions`) AS ...
0
votes
1answer
40 views

Obtain virtual column formula with SQL

We want to update the condition of a virtual column and to minimize error posibilites we want to extract the exact function working today to add new parameters to take into account. I've firstly test ...
1
vote
0answers
107 views

Does MySQL update indexes on virtual columns on tables that are being replicated from a master?

We use statement based bin log master-slave replication with MySQL 5.7. We use the slave for analytics and so add additional indexes and things not required on the master. I recently tried to add a ...
0
votes
1answer
457 views

“ORA-12899: value too large for column ”V_UUID“ (actual: 36, maximum: 4000)” when used to generate a Virtual column

I have the following function: CREATE FUNCTION UUID_AS_HEX(bytes IN RAW) RETURN CHAR DETERMINISTIC IS uuid CHAR(36); BEGIN RETURN REGEXP_REPLACE(bytes, '([0-9A-F]{8})?([0-9A-F]{4})?([0-9A-F]...
2
votes
2answers
11k views

Concatenate multiple columns into one column (,) separated [duplicate]

In SQL database that stores Images in a parcelImages table.Since each parcel can take part in multiple Images and each images can involve multiple parcels. I want to get each parcel having Image ...
4
votes
1answer
990 views

Oracle random number as default column value

I'm trying to create a table in OracleDB and assign random number to one of the columns as a default. I have this setup working in postgresql create table table_name ( column integer NOT NULL ...
4
votes
1answer
549 views

How do MySQL 5.7 virtual columns differ from views?

Starting reading point: https://www.percona.com/blog/2015/04/29/generated-virtual-columns-in-mysql-5-7-labs/ Running some tests with the most recent percona 5.7 they seem to work well. Explain plans ...
6
votes
1answer
5k views

Find columns referenced by virtual column expression

Does anyone know of any Oracle dictionary views that hold references of 'real' columns to virtual columns? For example lets say I have a table like this: create table t ( c1 varchar2(5) ,c2 as (c1 ...
0
votes
1answer
47 views

Database engine that share a row among multiple tables

I'm wondering whether exists any database engine that can share cells or rows amongst many tables. For example: TABLE Customer ( CID: int Fullname: nvarchar(50) Age: int ) TABLE Group ( ...
0
votes
0answers
401 views

Return a string from a pivot query

I have a query that uses around 6 or 7 tables and uses pivot to return a formatted string from this entire structure. Actually, today this query is dynamically generated via C#/Entity Framework and it ...
1
vote
2answers
1k views

Constant values in columns

I have a SQL Server 2000 database used by our ERP system. There are many columns that always have the same value. A table row is really huge, potentially exceeding the maximum row size in SQL Server ...
1
vote
1answer
989 views

Creat Temporary Id in SQL Statement

I have a table id name 1 Alpha 2 Alpha 3 Beta 4 Charlie 5 Charlie I want to assign a temporary id at the run time in the SQL statement, So the desired result should be like myid name 1 ...
4
votes
4answers
11k views

Is (and if how) it possible in Oracle to “insert into <table> values <rowtype-variable>” if <table> has virtual columns

Here's a table create table tq84_virtual_test_without ( col_1 number, col_2 number, col_3 number, col_4 number, col_5 number ); with the rule that col_5's value is the sum of the other ...