Jump to content

Mysql to test queries


john6384

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/2821-mysql-to-test-queries/
Share on other sites

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)

);

Link to comment
https://forums.phpfreaks.com/topic/2821-mysql-to-test-queries/#findComment-9447
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.