Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

SELECT command

crazypheelcrazypheel Member Posts: 1
Here is my problem:

I have a field name called "Full-Name"

I am trying to run a MySQL command that will show all the records, but only show the "Full-Name" of each of the records.

Assume my table name is call "TABLE".

I run the following command.

SELECT Full-Name FROM TABLE;

This returns an error saying that "Full" is not a recoginzed 'field list'.

I tried using quotes around Full-Name but they just gave me a column called "Full-Name" and every record had "Full-Name" in it.

Is there a way to get around this would changing the Field name to "Full_Name"?

At this point that's the only thing comes to mind, changing the field name.

Comments

  • JonathanJonathan Member Posts: 2,914
    : Here is my problem:
    :
    : I have a field name called "Full-Name"
    :
    : I am trying to run a MySQL command that will show all the records, but only show the "Full-Name" of each of the records.
    :
    : Assume my table name is call "TABLE".
    :
    : I run the following command.
    :
    : SELECT Full-Name FROM TABLE;
    :
    : This returns an error saying that "Full" is not a recoginzed 'field list'.
    :
    : I tried using quotes around Full-Name but they just gave me a column called "Full-Name" and every record had "Full-Name" in it.
    :
    : Is there a way to get around this would changing the Field name to "Full_Name"?
    :
    : At this point that's the only thing comes to mind, changing the field name.
    :
    You need to quote it, but not the way you were thinking of. Try:-

    SELECT `Full-Name` FROM TABLE;

    (e.g. quote it between backticks)

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • asharaniasharani Member Posts: 10
    : Here is my problem:
    :
    : I have a field name called "Full-Name"
    :
    : I am trying to run a MySQL command that will show all the records, but only show the "Full-Name" of each of the records.
    :
    : Assume my table name is call "TABLE".
    :
    : I run the following command.
    :
    : SELECT Full-Name FROM TABLE;
    :
    : This returns an error saying that "Full" is not a recoginzed 'field list'.
    :
    change the field name as
    ALTER TABLE table_name
    RENAME COLUMN old_name to new_name;
    see whether it will work or not

    : I tried using quotes around Full-Name but they just gave me a column called "Full-Name" and every record had "Full-Name" in it.
    :
    : Is there a way to get around this would changing the Field name to "Full_Name"?
    :
    : At this point that's the only thing comes to mind, changing the field name.
    :

Sign In or Register to comment.