• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

sql question

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

jmh547

Member
Joined
Jul 26, 2005
Well i have this homework and i dont know where to start i have to create a database called tBooks that is linked to tAuthors but using this code.

create table tBooks
(
BookID counter constraint tBook_PK primary key,
AuthorID int,
Title CHAR(30) NOT NULL,
PubDate DATE NOT NULL,
Notes CHAR(50),
Category INT NOT NULL,
constraint FKBooksAuthID FOREIGN KEY (AuthorID) References tAuthors
)

My problem is where do i put this code LOL do i put it somewhere into access or some kind of text file or what?

Thanks for you help
 
The way i know to run SQL are as follows:
1) Through PHP
2) Directly through PHPmyAdmin
3) Connecting to the db with a command line
4) I assume there is a way to copy and paste code somewhere in access

I think you want the fourth one.
 
I see how to do it in sql server but that isnt how he wanted us to do it....*banging head on desk*
 
jmh547 said:
I see how to do it in sql server but that isnt how he wanted us to do it....*banging head on desk*

You may wish to contact your professor or classmates for clarification. The provided code could be used in a Transact-SQL statement (perhaps as part of stored procedure), as a part of an asp/.net command or integrated into a php statement as zulfy26 mentioned.
 
Back