john6384 Posted November 7, 2005 Share Posted November 7, 2005 Hello, i have just downloaded mysql 5 in order to test some queries. Can anybody please give me some idea or point me in the direction of where to research how to setup a mysql table with this. Its mysql server 5 and ive been told that i can create tables with it. I just need a bit of info about this as im ok with queries but not actualy setting up databases. Ive also got mysql admin and the query tool. Thanks anyone Quote Link to comment https://forums.phpfreaks.com/topic/2821-mysql-to-test-queries/ Share on other sites More sharing options...
Cook Posted November 7, 2005 Share Posted November 7, 2005 Google 'mysql tutorial'. Alternatively check out the membership systems tutorials on this site. Quote Link to comment https://forums.phpfreaks.com/topic/2821-mysql-to-test-queries/#findComment-9445 Share on other sites More sharing options...
john6384 Posted November 7, 2005 Author Share Posted November 7, 2005 Ok thanks for that, I just needed to know where to look. Im making the tables using mysql command line. Here are my tables although im not sure if they will work - can you check if the foreign key and primary key are set right. Once ive got the tables working ill be fine. Please anyone check if these are right: create table emp ( EMPNO integer(4), ENAME varchar(10), JOB varchar(9), MGR integer(4), HIREDATE date, SAL integer(7), COMM integer(7), DEPTNO integer(2), FOREIGN KEY (EMPNO) ); create table dept ( DEPTNO integer(2) NOT NULL PRIMARY KEY, DNAME char(14), LOC char(13) ); Quote Link to comment https://forums.phpfreaks.com/topic/2821-mysql-to-test-queries/#findComment-9447 Share on other sites More sharing options...
john6384 Posted November 7, 2005 Author Share Posted November 7, 2005 Or does anybody know where i could find an example of table entry where there is the use of a foriegn and primary key?? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/2821-mysql-to-test-queries/#findComment-9451 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.