Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When you have a table called sheep and you would like to call it c what would be the correct way to do this in phpMyAdmin when writing the query

share|improve this question

migrated from stackoverflow.com Mar 25 '13 at 13:41

This question came from our site for professional and enthusiast programmers.

    
SELECT sheep_atribute FROM sheep AS c; ? –  Vucko Mar 25 '13 at 8:02

5 Answers 5

up vote 1 down vote accepted

Go to your phpMyAdmin database where the table is stored and go to the "SQL" tab.
Then proceed with this command:

RENAME TABLE table_name TO new_table_name

Or when you don't need to rename the table permanently you can use the AS statement

SELECT  c.*
FROM    sheep AS c
share|improve this answer

phpMyadmin is just an interface to access your database.

you can use mysql ALIASING to call it by different name or words for example

SELECT c.* FROM sheep c;

here c refers to table sheep so whenever you want to refer to sheep tables column you use the alias c.

share|improve this answer

It is called ALIAS. The basic syntax is:

SELECT  c.*
FROM    Sheep AS c

And AS is optional.

share|improve this answer

You can give alias name like below query

Select * from sheep c
share|improve this answer
SELECT c.* FROM sheep c 

This is The Answer

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.