![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| MK PitStop Member | What are they? I've seen them used in the phpBB and IPB source code where they have some long table query and instead of saying $table_prefix . "_posts" it says p.posts anypme know/use that? | ||
| |
| Advertisements |
| | #2 | ||
| Back Office Guy- ![]() | Never used it myself sql tend to be short working upto larger ones However it could be as u say an aliaes ie select * AS alises from tbl it may be setting the table to an aliases somewhre select * from tbl AS alises Probaly wrong but not toto strong on mysql | ||
| |
| | #3 | ||
| Member Level 1 | An alias is an alternative name for a table. They are actually used to reduce the length of a query. For example, instead of writing select employee.empname, dept.empdept from employee, dept where employee.empid =dept.empid you can write by defining an alias as below. select e.empname, d.empdept from employee e, dept d where e.empid = d.empid where employee and dept are table names. empname is a column in employee table and empdept is a column in empdept table. | ||
| |
| | #4 | ||
| MK PitStop Member | Its so you can compare the same named fields from different tables select a.customer_name, b.customer_address FROM customers a, customer_details b WHERE a.customers_id = b.customers_id
__________________ web development Free diggs for your stories bags of fashion - the latest in fashionable handbags | ||
| |
| | #5 | ||
| MK PitStop Member | this is normal practise to aviod ambiguaty by having a table alias or column alias too when you use a large join queries. it normally happends when the same column exits in multiple tables. | ||
| |
| | #6 | ||
| Member Level 3 | use views when you need to join more than 3 tables in your queries, because joining more tables with aliases with slow down your query | ||
| |
| Featured Websites | ||||
|
![]() |
| Tags: aliases, table |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Table Problem! Working on complex design! | Klaas_Koopman | HTML | 18 | 03-21-2006 4:21 PM |
| Featured Websites | ||||
|