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 4023704
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:37:52+00:00 2026-05-20T10:37:52+00:00

I have two SQL tables on SQL Server 2008 : GameData GameID PK GameReleaseDate

  • 0

I have two SQL tables on SQL Server 2008 :

GameData 

GameID PK 
GameReleaseDate
GameTitle 
GameCoverClobID FK


GameClob

GameCoverClobID PK
Filename

So over time the covers are updated and whatnot, and as a result, I have several items in GameClob that have no matching ID in GameData are now effectively redundant data. I’d like to be able to delete these items, however I was wondering is there a SQL query that I can run, that will just show me the rows in GameClob that have no GameCoverClobID in the GameData table.

I hope I have explained this correctly, any questions, please ask.

Appreciate it!

  • 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-05-20T10:37:53+00:00Added an answer on May 20, 2026 at 10:37 am

    Using the WHERE NOT EXISTS clause should be faster than LEFT JOIN and NOT IN because it shortcuts when the first record is found.

    SELECT * 
    FROM GameClob gc
    WHERE NOT EXISTS (SELECT * 
                        FROM GameData gd 
                       WHERE gc.GameCoverClobID = gd.GameCoverClobID )
    

    To prevent this problem in the future it is best to create a foreign key between the 2 tables

    ALTER TABLE GameClob 
    ADD CONSTRAINT fkGameClobGameData 
    FOREIGN KEY (GameCoverClobID) 
    REFERENCES GameData(GameCoverClobID)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three tables in SQL Server 2008 R2: Country Address and Country_Address Country
I'm using SQL Server 2008. I have a table with over 3 million records,
I have two tables one called Point and other called Poly i have around
I have two tables; let's call them TableA and TableB. Each element of TableB
Ok say I have two tables Product and Sales The product contains the id,
This is a tough one! I have two tables tblPeopleAnswers and tblAnswers tblPeopleAnswers PersonID
I have two tables as shown below The master Table ID keyword_tags ----------- ---------------------------------------------
We have an Access database migrated from Access 97 to Acces 2007 with some
I usually make applications with the front end in Access 2003 - 2007 and
Is it possible to calculate multiple aggregates based on differing where clauses? For instance:

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.