473,545 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AW: I simply can't compile this

Hi!

I know older versions of MySQL do not support foreign keys. Find out
weather your version do. If not, you may have to do without the foreign
keys in your definitions.

Best regards
Babs

-----Urspr=FCngliche Nachricht-----
Von: Morten Gulbrandsen [mailto:mg*@owi-aachen.de]=20
Gesendet: Freitag, 15. August 2003 12:05
An: my***@lists.mys ql.com
Betreff: I simply can't compile this

CREATE TABLE EMPLOYEE
(=20
FNAME VARCHAR(15) NOT NULL,
MINIT CHAR,
LNAME VARCHAR(15) NOT NULL,
SSN CHAR(9) NOT NULL,
BDATE DATE,
ADDRESS VARCHAR(30),
SEX CHAR,
SALARY DECIMAL(10,2),
SUPERSSN CHAR(9),
DNO INT NOT NULL DEFAULT 1,

PRIMARY KEY (SSN),
INDEX (SUPERSSN),=09
INDEX (DNO)
)TYPE =3D INNODB;
CREATE TABLE DEPARTMENT
(
DNAME VARCHAR(15) NOT NULL,
DNUMBER INT NOT NULL,
MGRSSN CHAR(9) NOT NULL DEFAULT '888665555',
MGRSTARTDATE DATE,

PRIMARY KEY (DNUMBER),
UNIQUE (DNAME),
INDEX (MGRSSN)
)TYPE =3D INNODB;

=09
ALTER TABLE EMPLOYEE=20
ADD FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN)
ON DELETE SET NULL =20
ON UPDATE CASCADE;

ALTER TABLE EMPLOYEE # here is the buggy code
ADD FOREIGN KEY (DNO) REFERENCES DEPARTMENT(DNUM BER)
ON DELETE SET DEFAULT =20
ON UPDATE CASCADE;=09
=09
ALTER TABLE DEPARTMENT
ADD FOREIGN KEY (MGRSSN) REFERENCES EMPLOYEE(SSN)=2 0
ON DELETE SET DEFAULT =20
ON UPDATE CASCADE ;
=09

Please tell me what could be wrong,
Yours Sincerely

Morten Gulbrandsen

--=20
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my******************@fongo.de


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 1433

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1551
by: Hal Vaughan | last post by:
I've noticed that when I'm fine tuning a class, I seem to get a quick compile time. Then, if I have to compile another class with a change, it takes much longer to compile. The next time I compile the 2nd class, it compiles quickly. Does the compiler do anything like track changes in files or use previous compile output while compiling a...
0
550
by: zhouhaiming | last post by:
On our test machine I can compile my c source code on AIX5.1(ML4) by "- q32" option and "OBJECT_MODE=32" environment variable, and it can correctly running. My operation system environment is: AIX5.1, ML4, 32 bit Kernel, IBM c5.1 compile and Informix7.31. I can't compile my c source code on the same system by using "-q64" option and...
0
453
by: B. Fongo | last post by:
Hi! I know older versions of MySQL do not support foreign keys. Find out weather your version do. If not, you may have to do without the foreign keys in your definitions. Best regards Babs -----Urspr=FCngliche Nachricht-----
0
2618
by: Jordan Willms | last post by:
My xsl stylesheet is as simple as follows: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:ims="http://www.imsglobal.org/xsd/imsmd_v1p2" xmlns="http://ltsc.ieee.org/xsd/LOMv1p0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes"/> <!--...
12
3415
by: jrefactors | last post by:
If the C programs have UNIX system calls such as fork(), alarm(), etc.., we should call it UNIX programs, not traditional C programs? We couldn't compile the programs with system calls using VC++ compiler. I need to compile it under UNIX platform. correct? any other alternatives?? Please advise. Thanks!!
8
2677
by: Davy | last post by:
Hi all, I use VC and gcc/gdb to compile and debug C/C++ files. But I found some of the debug version of the compiled files are too large to be run in a small RAM. Can I compile C/C++ Debug partially? Something like: fileA.c fileB.c And I can compile fileA.c with debug info and compile fileB.c without debug info?
10
3668
by: Jordan | last post by:
I would like to take my ASP.NET project to another computer, which doesn't have Visual Studio. If I modify the code there, is there a way to recompile it without Visual Studio? Thanks!
8
372
by: Vitaly Belman | last post by:
Hello pgsql-general, When I am running "make" I get the following: > gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I. -I~/postgresql-7.4.2/src/include -D_GNU_SOURCE -c -o dbsize.o dbsize.c > dbsize.c:1: postgres.h: No such file or directory > dbsize.c:7: access/heapam.h: No such file or directory...
12
2609
by: Ark | last post by:
Hello NG, I arrange data in structs like { members... uint16_t crc; more members, maybe... } Then I need to save them, up to and including crc, in non-volatile memory or a file, as the case may be. The data size I need for type T is offsetof(struct T, crc) +
4
1375
by: ygao | last post by:
>>compile('U"ÖÐ"','c:/test','single') <code object ? at 00F06B60, file "c:/test", line 1> <code object ? at 00F06BA0, file "c:/test", line 1> u'\xd6\xd0' u'\u4e2d' why is the result different? a bug or another reason?
0
7668
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7923
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7437
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5984
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.