4 Replies - 945 Views - Last Post: 18 July 2012 - 11:22 AM

#1 Rocket_Girl39  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 16-July 12

getting this '> instead of this ->

Posted 16 July 2012 - 12:41 PM

PLEASE HELP

I am taking database management I am a newbie, and I was inserting commands into my tables, well on the last bit of information I hit I think enter and it wont let me input anymore information. I am getting this symbol '> instead of this symbol ->
Is This A Good Question/Topic? 0
  • +

Replies To: getting this '> instead of this ->

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8939
  • View blog
  • Posts: 33,514
  • Joined: 12-June 08

Re: getting this '> instead of this ->

Posted 16 July 2012 - 01:10 PM

What? Explain what system you are using, where you are, etc...
Was This Post Helpful? 0
  • +
  • -

#3 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,964
  • Joined: 08-June 10

Re: getting this '> instead of this ->

Posted 16 July 2012 - 01:12 PM

When the MySQL console client shows you a '> prompt, it means that whatever you typed on the previous line opened a string but failed to close it. Everything you are typing, until the string is closed, will be read as a part of that open string value.

You most likely forgot the closing ' for a string value in the previous line.
Was This Post Helpful? 1
  • +
  • -

#4 Rocket_Girl39  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 16-July 12

Re: getting this '> instead of this ->

Posted 18 July 2012 - 09:29 AM

So how do you close it, when the string is opened? Thank you.
Was This Post Helpful? 0
  • +
  • -

#5 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,964
  • Joined: 08-June 10

Re: getting this '> instead of this ->

Posted 18 July 2012 - 11:22 AM

By typing the closing ' char. For instance:
mysql> SELECT thedata FROM whatever
    -> WHERE field1 = 'something'
    -> AND   field2 = 'something
    '> else entirely'
    -> AND   field3 = 42;


On the third line there I open a string but do not close it, so the next line has a '> prompt telling me that it's still reading input for that string. To close it I just type the closing ' char. You can see that the string is closed by the -> prompt on the line after that.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1