LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-25-2006, 07:15 PM   #1
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
How to create aliases in MySQL?


Using MySQL for some DB work.

I want to create some aliases on some tables, so I can do multi-joins...

For example, I have a table called order_line, and my experience with Oracle, to create an alias, you would enter the following:

Code:
order_line ol
But when I do this, it doesn't work...So...how do I setup the aliases?

Also how can I view them in MySQL too?

thanks
 
Old 02-26-2006, 12:13 PM   #2
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
I'm not sure that you can set a table alias in MySQL outside of a SELECT statement, e.g:

Code:
SELECT mb.FirstName, mb.LastName FROM tblMembers mb;
which works fine.

I may be wrong, however. If you have MySQL installed, you also should have the PDF manual - on my PC its at /usr/share/doc/packages/mysql/manual.pdf.

Rob
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Create alias in MySQL? JockVSJock Slackware 2 02-23-2006 09:15 PM
Mysql how to create user? fturcic Linux - Software 1 01-31-2005 11:23 PM
postfix and mysql aliases problem paintcheck200 Linux - Networking 0 01-06-2005 09:22 PM
mysql cannot create a user nocturnal Linux - Software 1 07-05-2003 10:52 AM
create MySQl-db via Web verve Programming 0 10-31-2002 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration