Tagged Questions
5
votes
2answers
160 views
Defining constraints in `CREATE TABLE` statements
Recently I have been using a Database Abstraction Layer built by a Python web-framework called web2py (click for their DAL syntax). They include the option to include your constraints within the ...
2
votes
2answers
185 views
SQL set allowed values for a column
I want to make an ALTER TABLE expression which adds a new column and sets a default value and additionaly defines the allowed values for that column. It's a text column, and allowed should be only ...
1
vote
2answers
397 views
Oracle Procedure to Enable/Disable all constraints
I have this nice piece of code:
begin
for i in
(
select constraint_name, table_name
from user_constraints
where constraint_type ='R'
and status = 'ENABLED'
) LOOP
execute immediate ...
6
votes
4answers
313 views
Can this business logic be enforced by a conditional database constraint?
I am trying to duplicate the business logic embodied an intranet C# web application in the database so that other databases can access it and work under the same rules. This "rule" seems difficult to ...
1
vote
2answers
199 views
Would existing constraints and indexes applied to an old table, apply to a new table renamed like the old one after it's dropped?
everything is in the question.
I have a table named tableA on which we have indexes and foreign keys and constraints.
I have to modify content in a column called column1. This being a production ...
1
vote
0answers
84 views
Dealing with Invisible Referencers
Using Oracle database, suppose I have a parent table parent defined in schema A, and a child table child defined in schema B. To achieve this, schema A granted references privilege on parent to schema ...
5
votes
1answer
127 views
Oracle: DB *partial* constraint?
I am pretty new to Oracle and the database world. I am not sure if the title makes any sense at all, so I'll just go ahead and explain my situation.
I currently have a table at hand that records ...
1
vote
1answer
870 views
function based index as a conditional unique key?
I have a search table which has a generated primary key PK_ID,and also has primary keys from three or four other tables in the FK_ID column
CREATE TABLE METADATA
(
PK_ID NUMBER(10) ...