2 messages in com.mysql.lists.win32RE: LEFT JOIN trouble. Please help.| From | Sent On | Attachments |
|---|---|---|
| Ján Fedorek | 12 Dec 2001 04:34 | |
| TJay Belt | 12 Dec 2001 08:54 |
| Subject: | RE: LEFT JOIN trouble. Please help.![]() |
|---|---|
| From: | TJay Belt (tj...@brooklinetechnologies.com) |
| Date: | 12/12/2001 08:54:08 AM |
| List: | com.mysql.lists.win32 |
are you doing these as two statements? the create and populate separately? It looks like they are together, but I am not sure that is possible, but have never tried.
from looking at it, I don't see why the select would have an effect on the nullness of a field.
The way I would do it is create the table by itself. Making sure that not null is a parameter of the field you want. then in a separate statement, populate it with data. Don't see why that wouldn't work, but again, have not tried your scenario
-----Original Message----- From: Ján Fedorek [mailto:je...@jeef.sk] Sent: Wednesday, December 12, 2001 5:35 AM To: win...@lists.mysql.com Subject: LEFT JOIN trouble. Please help.
Hi, I've got this problem:
I have two tables and I want create third one with LEFT JOIN First table table1 containts field AA as a primary key (AA is NOT NULL). Second table table2 containts field AA as a primary key (AA is NOT NULL) too. Ex: CREATE TABLE a (PRIMARY KEY(AA)) SELECT table1.AA FROM table2 LEFT JOIN table1 ON table2.AA=table1.AA WHERE ...; The problem is, that mysql creates new table with field AA, but it's not NOT NULL (it's allow NULL) => I cannot create primary key on this field. Is it bug or I'm wrong ???
Regards John.
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail win3...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail win3...@lists.mysql.com instead.




