corsasport.co.uk
 

Corsa Sport » Message Board » General Chat » SQL Help needed


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author SQL Help needed
RS6
Member

Registered: 5th Nov 03
Location: with MJ
User status: Offline
27th Jul 05 at 20:54   View User's Profile U2U Member Reply With Quote

Cannot anybody help me need to create a table

Head Office is the name of the table

needs to go in

Wages ID
Wages Details
Contact Number
Address

and assign primary keys to Wages ID
and foreigh keys

for coursework due in friday not sure the code that goes into sql

James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
27th Jul 05 at 21:02   View User's Profile U2U Member Reply With Quote

CREATE TABLE Head Office
(
Wages ID int NOT NULL AUTO_INCREMENT,
Wages Details varchar,
Contact Number varchar,
Address varchar
)
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
27th Jul 05 at 21:02   View User's Profile U2U Member Reply With Quote

wot do u want the foreign key to be?
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
27th Jul 05 at 21:05   View User's Profile U2U Member Reply With Quote

if you guna use varchar's like that though you should also assign the maximum field lengths e.g. Wages Details varchar(30)

This saves on memory
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
27th Jul 05 at 21:06   View User's Profile U2U Member Reply With Quote

And im also pretty sure field names have to be all one word e.g. WagesDetails
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
27th Jul 05 at 21:10   View User's Profile U2U Member Reply With Quote

CREATE TABLE Head Office
(
WagesID int NOT NULL AUTO_INCREMENT,
WagesDetails varchar(50),
ContactNumber varchar(20),
Address(50) varchar
)

like that
RS6
Member

Registered: 5th Nov 03
Location: with MJ
User status: Offline
27th Jul 05 at 21:44   View User's Profile U2U Member Reply With Quote

mucho thanks
RS6
Member

Registered: 5th Nov 03
Location: with MJ
User status: Offline
27th Jul 05 at 21:51   View User's Profile U2U Member Reply With Quote

how do u do a foreign key for one of those?

 
New Topic

New Poll

Corsa Sport » Message Board » General Chat » SQL Help needed 24 database queries in 0.0067551 seconds