Tuesday, March 12, 2013

MySQL show/create index

To show index from table tbl_abc

show index from tbl_abc

To show all the indexes under a selected schema:
use information_schema
Database change
select table_name, column_name, index_name from statistics where index_name!='primary' and table_schema='*database name*'

The exclude primary is to exclude the primary key assigned in the table.

To create index for a table. Syntax create index *index name* on *table name*(fields);
create index idx_test on tbl_abc(f1(10),f2(10));
Query ok, 1 rows affected (0.01sec)
Records: 1 Duplicates: 0 Warning: 0

MySQL combine all the rows

Table name: tbl_test
t_Field
--------
A1
A2
A3

Select group_concat(t_Field) from tbl_test;
Output:
t_Field
---------
A1,A2,A3

Select group_concat(t_Field SEPARATOR '@') from tbl_test;
Output:
t_Field
---------
A1@A2@A3

MySQL load SQL file


Load a SQL file from c drive
U see the MySQL command prompt
test_db scheme

use test_db

source c:/temp/abc.sql


To have the SQL log(all the pl/SQL log in a log file)
tee sqlout.log
Logging to file 'sqlout.log'

Turn off the log file
notee

Outfile disabled.

Thursday, March 7, 2013

Infect them all 2: zombie

This apps is one of the pay apps but now seems its free.. Download now to enjoy it!!'




Wednesday, March 6, 2013

4 Pics 1 Word Answer with Picture

Here is the answer with the screenshot.

3 letters word


4 letters word





5 letters word





6 letters word




7 letters word or more