It's not entirely clear what you're trying to achieve here, but I think that might be because your database design is a bit broken.
You're probably used to working with spreadsheets, becase you seem to have designed your Table3
as if it were a spreadsheet. Any time you end up with repeating fields in a database table (eg. Size1, Size2, Size3....) then it's a sign that you need to normalise more.
Please read up on database normalisation: http://www.studytonight.com/dbms/database-normalization.php (and also google generally for database normalisation for more info).
I suspect you'll need something more like this:
Article table:
ArticleID | ArticleName | SizeType(FK to SizeType table)
1 | Blue T-shirt | 1
2 | Red T-shirt | 2
SizeType table:
SizeTypeID | SizeTypeDescription
1 | US
2 | EU
Sizes table:
SizeID | SizeType(FK) | SizeDescription
1 | 1 | 38
2 | 1 | 40
3 | 2 | M
4 | 2 | L
Items table:
ItemID | ArticleID(FK) | SizeID(FK)
1 | 1 | 1 'Blue T-shirt size 38
2 | 1 | 2 'Blue T-shirt size 40
3 | 2 | 3 'Red T-shirt size M
4 | 2 | 4 'Red T-shirt size L
Orders table:
OrderID | CustomerID (FK) | OrderDate | etc. (other info you need to store about an order)
1 | 2458 | 01/01/2001|
2 | 3452 | 02/02/2002|
Order Details table:
OrderDetailsID | OrderID(FK) | ItemID (FK) | Quantity
1 | 1 | 3 | 6
2 | 1 | 4 | 3
3 | 2 | 1 | 1
So here linking everything back, Customer with ID 2458 has ordered 6x Size M Red T-shirts and 3x Size L Red T-shirts, and Customer with ID 3452 has ordered 1x size 38 Blue T-shirt.
Note You'd also realistically have a PRICE
field in either the Items table (if the price varies with the size of an item) or in the Article table (if the price is the same for every size). CustomerID would also link back to a table containing a customer's details (Name, address, username/password etc).
You might also have other things that I've not shown here, for example in either your Articles table or your Items table you'll probably have a supplierID which tells you who you buy that item from, as well as a supplierItemNo which would be a unique code (barcode?) which you use to order that item.
Once your database is structured properly it will be much easier to write queries to insert records etc.