-1

I've got an assignment to run some SQL queries on a table looking like this:
T1
C1| C2 | C3
x1| y1 | z1
x2| y2 | z2

But I'm not sure how to create the table in SQL.

  • You can find the create table syntax here - https://dev.mysql.com/doc/refman/8.0/en/create-table.html - or did you have some specific issue with this? – P.Salmon Aug 17 '20 at 08:16
  • Check out this link: [W3C](https://www.w3schools.com/sql/sql_create_table.asp). They provided simple explanations of SQL statements. Happy Coding :) – gpl Aug 17 '20 at 08:38

1 Answers1

1

Are you sure is the right way to design the tables?

It look like a simple Master/Detail model

Probably your T1 table is the master

On the second table (C) put a column with reference ID to the main table

The do the query with a simple Join or Left Join