satishgaudo.com

Understanding technology

Archive for April, 2010

Regular Expressions:Examples

* .at matches any three-character string ending with “at”, including “hat”, “cat”, and “bat”. * [hc]at matches “hat” and “cat”. * [^b]at matches all strings matched by .at except “bat”. * ^[hc]at matches “hat” and “cat”, but only at the beginning [...]

26 April 2010 at 15:01 - Comments

HAVING Clause

The HAVING clause was added to SQL because the WHERE clause could not be used with aggregate functions. Syntax: SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP BY column_name HAVING aggregate_function(column_name) operator value Example: SELECT customer,SUM(orderprice) FROM trans_orders GROUP BY customer HAVING SUM(orderprice)

26 April 2010 at 14:01 - Comments
Jane at 07:19 on 1 June 2011
Wow, your post makes mine look fbeele. More power to you!

ALTER TABLE for table indexing:Example

ALTER TABLE `listing` ADD INDEX `idx_uid_type` ( `uid` , `listing_type` ) ; ALTER TABLE `users` ADD INDEX ( `email` ) ; ALTER TABLE `listing_reply` ADD INDEX ( `listingid` , `uid` , `parent_listing` ) ;

13 April 2010 at 16:25 - Comments