Skip to content
Advertisement

Tag: primary-key

Foreign and Primary Key Conceptual Questions

I am a newbie at SQL/PostgreSQL, and I had a conceptual question about foreign keys and keys in general: Let’s say I have two tables: Table A and Table B. A has a bunch of columns, two of which are A.id, A.seq. The primary key is btree(A.id, A.seq) and it has a foreign key constraint that A.id references B.id. Note

MYSQL no duplicate of 2 values

I couldn’t find an answer for this exact question although I am sure the information is on here somewhere. I have a python script that is adding stock data into a database. For each stock database has ~1000 lines where ‘ticker’ is the stock name and ‘time’ is the date(1 for each day). When I run my update script I

Advertisement