Skip to content
DbaFix
Just share answer and question for fixing database problem
MENU
  • HOME

Tag: unique-constraint

Can you enforce uniqueness in MySQL based on column in foreign table?

By adminPosted on February 2, 2023

Question : I am refactoring one of my database tables and I’ve come up with an issue. Specifically, I have […]

Should I create a multi-column UNIQUE index?

By adminPosted on January 24, 2023

Question : I have created the following MySQL table, which stores which sections of our site a user visited (and […]

Why does InnoDB allow a 772 byte unique constraint?

By adminPosted on January 18, 2023

Question : I’ve defined a unique constraint for two columns: A bigint and a VARCHAR(256) COLLATE utf8mb4_unicode_ci Then this error […]

SQL Uniqueness Across Multiple Tables

By adminPosted on January 10, 2023

Question : I have two SQL tables: Users and clients. Every row in the users table has a set of […]

Is it better to add an index and search via the index or add a unique constraint and let an insert fail?

By adminPosted on December 31, 2022

Question : I have a table with over 2.5 million records in production that keeps track of if a specific […]

Unexpected unique constraint violation during update

By adminPosted on December 25, 2022

Question : In table foo with two columns (id and seq), I’d like to add +1 to seq for all […]

PostgreSQL relative update breaks unique constraint

By adminPosted on December 20, 2022

Question : I have unique index on column for UPSERT. When I am trying to update column using v = […]

Duplicate UNIQUE KEY error after ROLLBACK in MySQL

By adminPosted on December 20, 2022

Question : I have a table like this mysql> describe seudonimos; +————–+——————+——+—–+———+—————-+ | Field | Type | Null | Key […]

Unique indexed column in where clause and mysql execution after finding first row

By adminPosted on December 17, 2022

Question : Suppose in a table there are 2 columns: login and password login is indexed as unique index, password […]

Best way to model the relationship of unique pairs

By adminPosted on December 12, 2022

Question : I have two tables; one for storing thing and one for storing the relationship between two thing objects. […]

  • 1
  • 2
  • 3
  • …
  • 19

Recent Posts

  • Sqlite query slow whilst it should be fast
  • Should I normalize a relational database design if I know the data will never be updated?
  • Index not picked up on nullable boolean column
  • Can we protect data form Database Administrator by encrypting the data?
  • Oracle 12c SYSTEM user locked out
  • Max from 2 columns with priority date col then the seq col Oracle
  • MySQL incremental backups per database (not global)
  • Does PostgreSQL/PostGIS use R-Tree or R*-Tree?
  • Implementing a simple ERD in MySQL: is the implementation below 100% compliant with the ERD?
  • Postgres Vacuum in Function
  • How can we improve this PIVOT operation? ( SQL Server 2008 R2 )
  • mongodb restore multiple collections with single command
  • GRANT privileges to table elements
  • Is there any way to perform atomic updates of stored procedures in MySQL?
  • How to Transfer SSMS “Font & Color” settings from one machine to another?
  • SQL Server 2012 Intellisense Support for Extended Events
  • Multi-tenant database
  • Get column names and data types of a query, table or view
  • What is the effect on primary keys when moving a CLUSTERED index to a new filegroup?
  • Order of returned rows with IN statement

Categories

  • Database Backup
  • Database Design
  • Database Index
  • Database Optimization
  • InnoDB
  • Join
  • MariaDB
  • MongoDB
  • MySQL
  • Oracle
  • Performance
  • Permissions
  • Postgresql
  • Query Performance
  • Replication
  • Security
  • SQL Server
Proudly powered by WordPress / Support by: DizzyCoding