Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-hadoop Wiki" for 
change notification.

The following page has been changed by udanax:
http://wiki.apache.org/lucene-hadoop/Hbase/HbaseShell

The comment on the change is:
COUNT() added.

------------------------------------------------------------------------------
  ||<bgcolor="#ececec">'''Command''' ||<bgcolor="#ececec">'''Explanation''' ||
  ||Insert ||<99%>'''Insert''' command inserts one row into the table with a 
value for specified column in the table.[[BR]][[BR]]~-''INSERT INTO table_name 
(colmn_name, ...)[[BR]]{{{    }}}VALUES ('value', ...)[[BR]]{{{    }}}WHERE row 
= 'row-key'[[BR]]{{{    }}}[TIMESTAMP 'timestamp'];''-~ ||
  ||Delete ||'''Delete''' command deletes specified rows in table. 
[[BR]][[BR]]~-''DELETE { column_name, [, column_name] ... | 
COLUMNFAMILIES(column_family[, column_family] ... | *} [[BR]]{{{    }}}FROM 
table_name[[BR]]{{{    }}}[WHERE row = 'row-key'];''-~ ||
- ||Select ||<99%>'''Select''' command retrieves rows from a 
table.[[BR]][[BR]]~-''SELECT { column_name [, column_name] ... | * }[[BR]]{{{   
 }}}FROM table_name[[BR]]{{{    }}}[WHERE row = 'row-key' | STARTING FROM 
'row-key' [UNTIL 'stop-key']][[BR]]{{{    }}}[NUM_VERSIONS = 
version_count][[BR]]{{{    }}}[TIMESTAMP 'timestamp'][[BR]]{{{    }}}[LIMIT = 
row_count][[BR]]{{{    }}}[INTO FILE 
'file_name'][[BR]][[BR]]''-~'''column_name:'''~-''[[BR]]{{{     
}}}column_family_name[[BR]]{{{    }}}| column_family_name:column_label_name''-~ 
||
+ ||Select ||<99%>'''Select''' command retrieves rows from a 
table.[[BR]]Several aggregate operators: COUNT()[[BR]][[BR]]~-''SELECT { 
column_name [, column_name] ... | expr[alias] | * }[[BR]]{{{    }}}FROM 
table_name[[BR]]{{{    }}}[WHERE row = 'row-key' | STARTING FROM 'row-key' 
[UNTIL 'stop-key']][[BR]]{{{    }}}[NUM_VERSIONS = version_count][[BR]]{{{    
}}}[TIMESTAMP 'timestamp'][[BR]]{{{    }}}[LIMIT = row_count][[BR]]{{{    
}}}[INTO FILE 'file_name'][[BR]][[BR]]''-~'''column_name:'''~-''[[BR]]{{{     
}}}column_family_name[[BR]]{{{    }}}| column_family_name:column_label_name''-~ 
||
  
  = Examples =
  == Example Of Basic Query Command Uses ==
@@ -103, +103 @@

  SELECT    Select values from tables
  
  Syntax:
- SELECT { column_name, [, column_name] ... | *} FROM table_name
+ SELECT { column_name, [, column_name] ... | expr[alias] | *} FROM table_name
          [WHERE row='row_key' | STARTING FROM 'row-key' [UNTIL 'stop-key']]
          [NUM_VERSIONS = version_count]
          [TIMESTAMP 'timestamp']
@@ -121, +121 @@

  {{{
  hql > SELECT studioName: FROM movieLog_table WHERE row = 'Star Wars';
  
- +---------------------------------------------+
+ +----------------------------+
- | title         studioName                    |
+ | title         studioName   |
- | =========================================== |
+ | ========================== |
- | Star Wars     Fox Entertainment Group, Inc. |
+ | Star Wars     Fox          |
- +---------------------------------------------+
+ +----------------------------+
  
  Successfully print out the selected data.(0.05 sec)
  
- hql > SELECT 'studioName:YoungGu Art, Corp.' FROM movieLog_table WHERE row = 
'D-War';
+ hql > SELECT count(studioName:Fox) FROM movieLog_table;
  }}}
  
  === Insert data into a table ===

Reply via email to