Category Archives: SQ L& MYsql

Indexing in mysql database

My database name is testdata it has 3 fields ID,Name,City for increasing the speed of getting data using name field us the following method Query is like below Select * from testdata order by Name asc For creating indexing for the Name field create index Name_index on testdata (Name); Indexing will slow down the insert… Read More »

“ISnull” field in Mysql database table showing as Zero for a single record. Why?

Present scenario:: In an already existing table we added a new field with data type tinyint with default as null Age- varchar-250 name-varchar-250 testid-tinyint-default-null-yes (newly added field) After creating the new field entire table data with testid as ‘NULL’ value. and once i did update on a particular record through query testid updated to ‘0’… Read More »

Select Clause to find out the current timestamp?

See the Example Select * from mydoubts_data +———+————————-+——————–+ | EMPCODE | NAME | SALARAY CODE | +———+————————-+——————–+ | 787 | Vasanthan | K | | GORT | Shaji | S | | GKL | James | P | | IND | Abdul | ZO | | VIS | Sunil | F | +———+————————-+——————–+ For Example… Read More »