SQL in Terminal Question

Discussion in 'Web Design and Development' started by Jas123, Jul 23, 2009.

  1. Jas123 macrumors member

    Apr 1, 2008
    When type over multiple lines I get this:
    -> ect ect.

    is it possible to move to the previous line after pressing return?
  2. ChrisA macrumors G4

    Jan 5, 2006
    Redondo Beach, California
    What program are you using? There is a good chance the up arrow key will do what you are asking for.
  3. angelwatt Moderator emeritus


    Aug 16, 2005
    I believe he's using MySQL from Terminal. What he's showing is when you're typing queries over multiple lines until you put in a semicolon. I think there may be a way, but not 100%, just be careful with the enter key.
  4. Jas123 thread starter macrumors member

    Apr 1, 2008
    Thanks for the reply guys. Yes this is what I am talking about. I often find that after typing out long tedious queries, i'll have an error on a couple lines before and will have to retype the whole thing out again. So I was just wondering if there was any shortcut for this.
  5. trule macrumors 6502

    Mar 16, 2007
    type your queries up in a text editor and copy paste them across.

    or type them in a file and run the file from mysql
    mysql > SOURCE somefile;

    or use a GUI/Web front end...

Share This Page