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

  • SEARCH
  • Home
  • 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 8390823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:06:23+00:00 2026-06-09T19:06:23+00:00

Why couldn’t the definition of REFERENCES be expanded to also support table constraints, and

  • 0

Why couldn’t the definition of REFERENCES be expanded to also support table constraints, and then FOREIGN KEY could be eliminated from SQL?

It’s clear that the difference between REFERENCES and FOREIGN KEY is that REFERENCES is a column constraint, whereas FOREIGN KEY is a table constraint.

For example, create table T (A int, B int, C int, primary key (A,B), (B,C) references T(A,B) on delete cascade) is not legal, because you need to have foreign key before (B, C), because the constraint refers to multiple columns.

  • 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-09T19:06:25+00:00Added an answer on June 9, 2026 at 7:06 pm

    SQL is verbose and highly explicit. Why? There will be no good answer except for the fact that the SQL-1992 standard already defined things this way:

    11.8 <referential constraint definition>
    
    [...]
    
    Format
    
         <referential constraint definition> ::=
              FOREIGN KEY <left paren> <referencing columns> <right paren>
                <references specification>
    
         <references specification> ::=
              REFERENCES <referenced table and columns>
                [ MATCH <match type> ]
                [ <referential triggered action> ]
    

    FOREIGN KEY is just a mandatory keyword in a DDL statement. That’s it. One could argue that a FOREIGN KEY constraint shouldn’t be a higher-class citizen compared to a UNIQUE or CHECK constraint, hence they all need their appropriate keyword

    11.6 <table constraint definition>
    
    [...]
    
        <table constraint> ::=
                <unique constraint definition>
              | <referential constraint definition>
              | <check constraint definition>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

couldn't access registry HKLM keys from windows xp limited/guest user accounts public int GetEnabledStatus()
i couldn't send data from my device to my php file. i am trying
I couldn't find any mapview template for the graphical layout. Mapview is from google,
Couldn't i? i need to call a method from class A , this method
Couldn't find better title but i need a Regex to extract link from sample
i couldn't find anything so i just wanted to take a url and then
Couldn't call stored procedure with temporary table: DELIMITER $$ DROP PROCEDURE IF EXISTS `summary_daily_reports`$$
Couldn't find anything in the github documentation and also here on SO. But I
Couldn't remember better title, feel free to change it to something better :) My
Couldn't get FacesContext.getCurrentInstance() in self spawned thread. Required to update the components dynamically based

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.