Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    0
    ReputationRep:
    I'm using python and SQL for my comp4 project, ran into a problem I can autoincrement a primary key in a table in my database however I then have that as a foreign key in another table and it isn't letting me autoincrement. Anyone able to help?? Thanks
    Offline

    11
    ReputationRep:
    (Original post by Milner1997)
    I'm using python and SQL for my comp4 project, ran into a problem I can autoincrement a primary key in a table in my database however I then have that as a foreign key in another table and it isn't letting me autoincrement. Anyone able to help?? Thanks
    This seems to be a normalisation problem. Which sql are you using? If you create a record in a table, auto increment should be fine. Possibly you are trying to create an entry in the pk table and the child entry at the same time.

    You really need to provide more detail such as your table structures and maybe attach a sqldump.
 
 
 
Poll
Do you agree with the PM's proposal to cut tuition fees for some courses?
Help with your A-levels

All the essentials

The adventure begins mug

Student life: what to expect

What it's really like going to uni

Rosette

Essay expert

Learn to write like a pro with our ultimate essay guide.

Uni match

Uni match

Our tool will help you find the perfect course for you

Study planner

Create a study plan

Get your head around what you need to do and when with the study planner tool.

Study planner

Resources by subject

Everything from mind maps to class notes.

Hands typing

Degrees without fees

Discover more about degree-level apprenticeships.

A student doing homework

Study tips from A* students

Students who got top grades in their A-levels share their secrets

Study help links and info

Can you help? Study help unanswered threadsRules and posting guidelines

Sponsored content:

HEAR

HEAR

Find out how a Higher Education Achievement Report can help you prove your achievements.

Groups associated with this forum:

View associated groups

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.