This site uses cookies from Google to deliver its services, to personalize ads and to analyze traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies. Learn More

[Web-development (jquery)] Shorter SQL statements by abbreviating table prefixes

Shorter SQL statements by abbreviating table prefixesShorter SQL statements by abbreviating table prefixes






Instead of writing:

SELECT books.title, books.short, books.releasedate, authors.firstname, authors.lastname
FROM books, authors
WHERE books.author_id = authors.id AND authors.id = 21

You can write:

SELECT b.title, b.short, b.releasedate, a.firstname, a.lastname
FROM books b, authors a
WHERE b.author_id = a.id AND a.id = 21

source : http://tutorial101.blogspot.com, http://docstoc.com, http://stackoverflow.com

0 Response to "[Web-development (jquery)] Shorter SQL statements by abbreviating table prefixes"

Post a Comment

Contact

Name

Email *

Message *