![]() |
|
#1
|
||||
|
||||
I need help on My SQL Database Creation StatementHi All
I am New to MySQL, I need a help on creation Statement for the my following statement(SQL). Please check is it correctness, and please to suggest me the correct statement, I attached my Databases structure on pdf. Followings are my owns. For the Mmeber Table Creation: Quote:
This is for the Book Quote:
This is for the Copies Table: Quote:
This Is for the Reserved Copy: Quote:
These are my statements, Only Book statement running others are giving the 150 error. Please to solve my problem soon. |
||||
|
#2
|
||||
|
||||
Re: I need help on My SQL Database Creation StatementThere's a stray comma near the end of Member table creation...
I'll try the others... __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
||||
|
||||
Re: I need help on My SQL Database Creation StatementMinor changes...(compare to your original post), but basically:
1. member table (dropped unique at the end, append to University_ID) 2. copies (type boolean is converted to a tinyint; only takes 1, 0) 3. reserved_copy table (foreign key change, column 'ISBN' listed twice) Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#4
|
|||
|
|||
Re: I need help on My SQL Database Creation StatementDear Turbo,
Thakn you very much, My problem is, FOREIGN KEY(member_id) REFERENCES member(member_id) ON UPDATE CASCADE); In this If I want to be set both UPDATE and DELETE constrains? |
|
#5
|
|||
|
|||
Re: I need help on My SQL Database Creation StatementDear Turbo
These are the Error Coming while executes the SQL Commands. Attached PDF |
|
#6
|
||||
|
||||
Re: I need help on My SQL Database Creation StatementAlright, where's your silent 'strip-spaces' command? (just kidding)...
1. Member, seems to missing the final ')' to create table, plus a few fields, as it appears on the PDF, don't have a space between the column name and the type. 2. Book, same spacing issue for the ISBN column. 3. Copies, fixing #2 should resolve this, but check the spaces after the column names, again. 4. Reserved_copy, look at the error message, what's with the ampersand [&]? Also, check column name spacing. 5. Borrowed_copy, appears to have a stray comma (error hints at location) in the first foreign key declaration, check column spaces too. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#7
|
|||
|
|||
Re: I need help on My SQL Database Creation StatementHi Turbo,
Thank you Very Much for your help on the above problem, I got the solution for that. |
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| getting an error while compiling and running using different IDE. | jaro | C Programming Language | 0 | 25-Aug-2006 09:14 |
| functions seems not to exit from a certain code block | jaro | C Programming Language | 3 | 21-Mar-2006 23:08 |
| Microsoft SQL Server :: SQL Server message 241, state 1, severity 16 | lyuboe | MySQL / PHP Forum | 0 | 11-May-2005 04:31 |
| Compiling error when doing SQL database in C++ | confused_pig | C++ Forum | 2 | 12-Jan-2005 21:08 |
| SQL statement | skyloon | MySQL / PHP Forum | 2 | 12-Oct-2003 06:48 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The