Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8378043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:49:54+00:00 2026-06-09T15:49:54+00:00

I am trying to create table with division possibilities and i want that the

  • 0

I am trying to create table with division possibilities and i want that the sum of all the cells in one row will be 1.
For example:

0.1, 0.2, 0.3, 0.3, 0.1  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:49:55+00:00Added an answer on June 9, 2026 at 3:49 pm

    You can create a constraint on the table that requires each row to meet some condition, in this case that total of columns be 1:

    create table my_table (
      col1 number,
      col2 number,
      col3 number,
      col4 number,
      constraint assert_sum_is_one check (col1 + col2 + col3 + col4 = 1)
    )
    

    Any attempt to insert or update rows to not total 1 will cause a constraint violation exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a table with values that are in a String
I am trying to create a table where one of the columns has a
I'm trying to create a table that has a primary key (Department_ID) that auto
I'm trying to create this table and I want to gauge my eyes out.
I'm trying to create a migration for a simple table that is just used
Trying to create this example table structure in Postgres 9.1: CREATE TABLE foo (
I am trying to create a table that references another table in my db
Hi I am trying to create a table using inner select statement... for example:
I'm trying to create one entity from 2 tables that are related not by
I am trying to create a relation/table in Oracle that is between two many

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.