Most voted "constraint" questions
None
Learn more…23 questions
Sort by count of
-
7
votes1
answer169
viewsHow to fix rigid "bodies" using Physx
How can I fix two rigid or dynamic "bodies" in a way that where one goes the other goes together as fixed as possible with Physx. I’m using the class PxFixedJoint but I didn’t like it. As you can…
-
5
votes2
answers844
viewsCONSTRAINT that adds parameter to FOREIGN KEY?
I have the following code for creating tables: CREATE TABLE pessoa ( cod_pessoa int NOT NULL IDENTITY PRIMARY KEY, nm_pessoa varchar (50) NOT NULL, tp_pessoa char(1) NOT NULL, endereco_pessoa…
-
5
votes2
answers2215
viewsWhat is the difference between using a "Constraint" in "Foreign key" or not?
When creating a table in Mysql I used to create fields CONSTRAINT FOREIGN KEY how are you following to create the foreign key: CREATE TABLE socio ( id_socio INTEGER NOT NULL, nome VARCHAR(256) NOT…
-
4
votes1
answer75
viewsWhen should I create a Constraint like DEFERRED?
As far as I know, creating a Constraint (like a foreign key or a check) like DEFERRED makes it only validated at the end of the transaction. What is this used for? And when it should not be used?…
-
4
votes1
answer1716
viewsHow to create a single index based on two columns?
I have a table with these columns: ip nome email I want you to ip and the email are a single pair. The same ip may contain several records and a single email may also. But the same ip and even email…
-
1
votes1
answer7703
viewsProblems with Constraints in Postgresql
I’m going through a problem with Postgresql, 8.1. When adding constraints it returns this error: SQL error: ERROR: there is no Unique Constraint matching Given Keys for referenced table "called"…
-
1
votes0
answers320
viewsCPF Hibernate Constraint does not accept valid CPF?
I’m trying to run the Hibernate CPF validation Constraint, but it just seems to reject valid CPF. The same test using Email Straint works normally: EmailValidator validator = new EmailValidator();…
-
1
votes1
answer91
viewsSQL Constraints fits as DML or DDL?
DDL - Data Definition language: is used to create and change tables (CREATE, ALTER, etc.), right? DML - Data Manipulation language: is used for handling table data (INSERT, UPDATE, DELETE, SELECT).…
-
1
votes2
answers2140
viewsHow to add a "Constraint Unique" to a column without deleting the table or column
This is the example table create table usuario( id serial primary key not null, nome varchar(100), email varchar(100), login varchar(100), senha varchar(100), tipo varchar(50), status varchar(30) )…
-
1
votes0
answers344
viewsError Code: 1452. Cannot add or update a Child Row: a Foreign key Constraint fails
I’d like to ask a question, or just show me the way. There is a table called Questionrio from it I take the records in a precedent and organize the data in it. Here is my code: CREATE…
-
1
votes1
answer1926
viewsHow to create a Primary Key Constraint named in Postgres?
I am proceeding this way to create a table without primary key initially. Then I add a field id serial type and try to create the Constraint to the Primary Key (PK): create table macaco( nome…
-
0
votes1
answer5423
viewsHow to disable a Constraint in ORACLE?
I have a table where two specific fields together cannot have the same values. I BELIEVE who are they: NUM_PERIODO_LANCAMENTO COD_INDICADOR Assuming I have that data: NUM_PERIODO_LANCAMENTO = 1 ,…
-
0
votes1
answer47
viewsHow to store the Pxfixedjoint class in a vector
I’m trying to store the class PxFixedJoint in a std::vector with the method push_back. But the vector is always empty, simply adds nothing. Down with the code. // C++ // Declaração do vector para…
-
0
votes1
answer485
viewsPostgresql Constraint error
I have a code that is giving the following error: there is no Unique Constraint matching Given Keys for referenced table "schedule" Code: CREATE TYPE weekday AS ENUM ('Domingo', 'Segunda', 'Terça',…
-
0
votes1
answer857
viewsMysql error "Cannot add Foreign key Constraint"
I am starting in SQL language. I have the following error: Table 'linces.controlos' doesn't exist I haven’t found the solution yet, someone can help? Drop Database if Exists Linces; Create Database…
-
0
votes1
answer99
viewsHow to change a Primary key to Auto_increment Constraint
I created the following table create table if not exists cursos( nome varchar (30) not null unique, descicao text, carga int unsigned, totaulas int, ano year default '2018' )default charset = utf8;…
-
0
votes1
answer732
viewsError creating Foreign key
I am creating two references of Foreign key pointing to two different tables, however I am getting error in creating one of them. There are no Primary or candidate Keys in the referenced table…
-
0
votes1
answer278
viewsError adding ON DELETE CASCADE two Foreign Keys from the same table
I am deploying a table to save the messages, in this table I have source users (sender) and destination user(recipient) from the same table: user. When trying to add the constraints to the message…
-
0
votes1
answer90
viewsField of type ENUM empty arrow when not a valid value
Test scenario Data set: 10.4.11-Mariadb Table: tabela Campos: id (INT, PK, NOT NULL), ativo (ENUM('S','N'), NOT NULL) Instruction UPDATE tabela SET ativo = 'XXX' WHERE id = 1 Return 1 Row(s)…
-
0
votes0
answers25
viewserror in foreign key creation
I’m studying bank and my foreign key does not create, I know I’m doing something wrong, but I can not understand what there is. these are the tablets I want to call' create table tb_cardapio(…
-
0
votes1
answer39
viewsProblems in the relationship of two tables
Can you help me with that ? Being objective neither father nor children allow exclusion, it is a strong family bond that was created here: mysql> delete from Routes Where id = 1; ERROR 1451…
-
-1
votes1
answer273
viewsCannot add Foreign key Constraint! but syntax and pks are correct
I’m trying to create a FK for a table, I don’t understand syntax error, but the TOAD returns the message that cannot create FK. Tables are created in the database, and Pks are right. ALTER TABLE…
-
-2
votes2
answers64
viewsConstraint Layout cannot align to the corner of the screen - bottom of
Hello, I have a Layout. xml that has a text as parameter and that in the lower right corner of this screen should be displayed a Floating Action Button, as shown in the preview layout below What in…