|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
The Web Buyer's Guide is your best source for white papers on a wide range of IT products and services. This Week's Featured White Papers: Help Simplify Virtualization by IBM
|
|
#1
|
|||
|
|||
|
mysql code help
hello guys,
it's great to see that the forums are back! i used to use them b4 they went down anyhow, can someone please help me out with the code below... it gives me an error in mysql console app...create database mydata; use mydata; create table students ( studentid int auto increment not null, name varchar(60), age tinyint, sex enum('m', 'f'), active bit, primary key(studentid), unique id(studentid) ); it says that incorrect syntax near "studentid int auto increment not null, name varchar(60)," and i am baffled. any ideas? thanks. |
|
#2
|
|||
|
|||
|
try AUTO_INCREMENT instead of AUTO INCREMENT.
Your query should now read: create table students ( studentid int auto_increment not null, name varchar(60), age tinyint, sex enum('m', 'f'), active bit, primary key(studentid), unique id(studentid) ); |
|
#3
|
|||
|
|||
|
I agree with Bill on this one also to make things easier i have written php codes in order to allow u to create alter and redefine database based on ur preference . If u want me to send it to u via mail please email me
|
|
#4
|
|||
|
|||
|
ahhh thanks heh. it's always the smaller things that i overlooked. it worked a treat. amitabah, what's this code you're taking about? could you give me more details through the forum? thanks.
![]() |
|
#5
|
|||
|
|||
|
Don't forget sql is space sensitive, the amout of problems its caused me because of a space ive put in, has put me though hell. If you have any more problems when running a query try playing around with the spaces between each charcter
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > mysql code help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|