473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Missing inner JOIN statement. For a school project i made a database. My teacher told

Hello everyone,

For a school project i made a database. My teacher told me that i am missing a JOIN statement in the third query. can anyone help out?

Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE DiscountCard ( 
  2.     cardnumber integer Primary key, 
  3.     name varchar(255), 
  4.     address varchar(255), 
  5.     city varchar(255) 
  6. );
  7. CREATE TABLE Transaction (
  8.     TransactionNumber Integer PRIMARY KEY,
  9.     date date NOT NULL,
  10.     time time NOT NULL,
  11.     cardnumber integer REFERENCES Discountcard(cardnumber),
  12.     Storenumber integer REFERENCES Store(Storenumber)
  13.  
  14. );
  15. CREATE TABLE Store(
  16.     Storenumber integer PRIMARY KEY,
  17.     Area varchar(255) NOT NULL,
  18.     address varchar(255) NOT NULL
  19. );
  20. CREATE TABLE Product (
  21.     Productnumber integer PRIMARY KEY,
  22.     Productname varchar(255) NOT NULL,
  23.     Price Decimal(5,2) NOT NULL
  24. );
  25. CREATE TABLE Purchase (
  26.     transactionnumber integer,
  27.     product integer, 
  28.     amount integer NOT NULL,
  29.     PRIMARY KEY(transactionnumber, product),
  30.     FOREIGN KEY(transactionnumber) REFERENCES Transaction(transactionnumber),
  31.     FOREIGN KEY(product) REFERENCES Product(Productnumber
Jan 20 '20 #1
0 1871

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Barry Young | last post by:
I am using Access to create a SQL query. It creates an Inner Join Query. I cut and paste the query into PL-SQL. When I try to execute the query I get an error. ORA 933 SQL command not properly...
11
by: news-east.earthlink.net | last post by:
The scenario: two tables CustomerTable --------------- CustomerID OrderID CustomerName CustomerEmail
4
by: Nathan | last post by:
I have an application that uses an Access database to gather information on students' test scores. In the database there are three tables which are joined by one- to-many relationships: ...
6
by: dmonroe | last post by:
hi group -- Im having a nested inner join problem with an Access SQl statement/Query design. Im running the query from ASP and not usng the access interface at all. Here's the tables: ...
52
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible...
3
by: Zeff | last post by:
Hi all, I have a relational database, where all info is kept in separate tables and just the id's from those tables are stored in one central table (tblMaster)... I want to perform a query, so...
6
by: Flo100 | last post by:
My Query is as follows: Select .,., sum(.) as Cost FROM as Q INNER JOIN as ON .=. INNER JOIN (Select .,. FROM as P INNER JOIN as Q ON .=. GROUP BY .,. HAVING .=yes) as Q1 ON .=. GROUP BY...
3
by: Anila | last post by:
Hi Friends, My problem with Inner join is ... first i joined two tables and i got the result. after that iam trying to join one more table its giving syn tax error in JOIN condition. ...
1
by: teneesh | last post by:
Here I have a code for a view that has been created by a developer on my team. I am trying to use the very same code to create a view for a different formid/quesid. But I cannot figure out how this...
2
by: saranmc | last post by:
I Need some help in formulating a Statement. I know that I have to use the JOIN Statement but I am a Little confused on which one and how to. the Task I want to do is to find the "Project name"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.