Questions tagged [null]

A database concept used to represent missing, unknown or inapplicable data.

17 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
39 views

Oracle DISTINCT with NULLable columns

There is a longstanding(?) problem(?) with Oracle that if you want to use a DISTINCT select on a column which has a B*-Tree Index but is nullable, that the index is not used. (As other answers suggest,...
2
votes
0answers
129 views

Inserting two NULLs values into an UNIQUE column in SQLite

I use: sqlite-jdbc-3.21.0.jar Error received: SQLite_CONSTRAINT_UNIQUE] A UNIQUE constraint failed: companies.ncf I ask a few things to the user, there is two fields that are optional to complete ...
2
votes
1answer
116 views

Why does coalescing make this query quicker?

I have the following query SELECT SQL_NO_CACHE `table1`.* FROM `table1` LEFT JOIN `table2` ON table2.id = table1.table2_id WHERE (`table2`.`date_assigned` >= '2015-06-21') AND ( ...
1
vote
0answers
38 views

Should I Use Nulls/Blanks to Convey Meaning in a Related Column Representing a Category?

I'm designing a personal database that has a table which contains categories for seasonal events of a video game. In my design I have a related column from Events to Items (one to many [1:m] ...
1
vote
0answers
238 views

Allow Null Columns vs separate 1-to-many tables

Perhaps similar questions have been asked, but this is re having null columns. I am too inexperienced to determine what would be the sounder way to approach the design of this database. Is it better ...
1
vote
0answers
401 views

Apache Phoenix Upsert not working while trying to update null/empty columns

Step 1: Update a column with null value. Upsert into abc.tablename (Rowkeycombo1, Rowkeycombo2, columnname) values (123,to_date('1988-08-06'),null); This works fine and the column then appears to ...
1
vote
1answer
42 views

Not Null Fields and Unmatched Number of Columns

I am in charge of a task of migrating data from MySQL to PostgreSQL. I have already migrated the MySQL database to PostgreSQL with the help of pgloader. My problem is I need to insert the data from ...
1
vote
1answer
49 views

Any potential complications from ms sql backup db to disk = 'nul', disk = 'nul', …?

Our development team has a tool that notifies us of issues with our DB backups, but they have not yet given us the ability to exclude certain databases from the alerts - DBs that we do not want ...
1
vote
0answers
37 views

How to best distinguish between “types” of missing data?

I am working on large tables (> 100 fields each) currently organized in flat-files in csv-format. An Oracle DB is to be created to store all the data and allow for several more or less intricate ...
1
vote
0answers
298 views

How to replace empty, multi-column result with single 'none'

If it is possible to make query in Oracle which will return single column/row with value "none" instead of empty, multi-column result? Otherwise return proper amount of columns with result. This is ...
1
vote
0answers
194 views

How to merge rows based on how much data they have?

I am cleaning data and I formed a table something like this: file | product | color | product_id --------------------------------------------- one.csv pipe blue null ...
1
vote
0answers
459 views

Dealing with null values in non-nullable columns in a NoSQL database

If I have an existing table in a NoSQL database cluster and I want to add a new column that should never return null, how do I handle it in my application code? I can update all exist records and set ...
1
vote
2answers
76 views

Replace Null values with values from the same column by matching values in a different column

I have a table with some null values in column "date": platform date id --------------------------- web 2018-10-10 1 mob 1 mob 1 web ...
0
votes
0answers
37 views

Pagination using seek-method with nullable columns, sharing a composite index with ORDER BY

I have the following table: CREATE TABLE users( id text PRIMARY KEY, -- actually a uuid organization_id text NOT NULL, lname text NOT NULL, fname text NOT NULL -- other irrelevant fields ); ...
0
votes
1answer
99 views

Using NULL values for foreign key with normalization

I am creating a table as follows: Building (PK: buildingID) Area (PK: areaID, FK: buildingID) Room (PK: roomID, FK: buildingID, FK: areaID) All rooms are in a building. Some rooms can be in an area ...
0
votes
0answers
1k views

Oracle 12c, exclude rows wher two columns are both null

Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit I am trying to select rows with a non-null value in one of two columns. Data is being selected from a view (MY_VIEW) with both ...
0
votes
0answers
70 views

MySQL - query join returning zero recs from table with data

I've provided a file that has the table structure and some sample data that I'm working with. I don't understand why I'm getting nulls from a joined table, where there is data. Here's my query ...