Jump to content

Simple Sql Error

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
45 replies to this topic

#1
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,247 posts
I started learning SQL today and first script and I got some stupid error that I can't figure out. :(

DROP table IF EXISTS address;
CREATE TABLE address (
ID INT NOT NULL PRIMARY KEY,
firstName VARCHAR(20),
lastName VARCHAR(20),
email VARCHAR(25),
aDate DATE,
aTime TIME,
dayNumber VARCHAR(15), ## phone number to be called during the day
eveningNumber VARCHAR(15), ## phone number to be called during the evening
cellNumber VARCHAR(15) ## cell phone number
);

INSERT INTO address VALUES (0,'James','Brocklebank','james_45 @live.ca','2008-06-29','07:03:30','','','not available');

SELECT * FROM address ORDER BY lastName;
When i try to run the code I get an error message that says:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 8

I don't get it? i don't see a problem.

#2
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Mayve it doesn't like you. :p
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#3
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,247 posts
haha very funny but if your interested I found out what was wrong with it.


DROP table IF EXISTS address;
CREATE TABLE address (
ID INT NOT NULL PRIMARY KEY,
firstName VARCHAR(20),
lastName VARCHAR(20),
email VARCHAR(25),
aDate DATE,
aTime TIME,
dayNumber VARCHAR(15), ## phone number to be called during the day
eveningNumber VARCHAR(15), ## phone number to be called during the evening
cellNumber VARCHAR(15) ## cell phone number
);

INSERT INTO address VALUES (0,'James','Brocklebank','james_45 @live.ca','2008-06-29','07:03:30','','','not available');

SELECT * FROM address ORDER BY lastName;
:D

#4
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
What's changed?
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#5
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,247 posts
I can't really remember something wasn't working :\ and i tried it and the first one worked. so maybe your right, maybe it does hate me. :\

#6
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Hmm... do you have a webcam installed?
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#7
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,247 posts
nope why? a little random don't you think?

#8
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Because the SQL Server Service could be spying on you... :)
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#9
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,247 posts
:o very funny but yeah, just having terrible luck with SQL today.

no more sql for today :)

#10
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Luckily for me, I don't use SQL... but you knew that already. :p
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#11
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,247 posts
yeah :) it can do a lot of good things with it but mysql hates me apparently :\

#12
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Aw, diddums. :) Show it who's boss! :D
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums