Feeds:
Posts
Comments

Posts Tagged ‘MySQL’

To get the 2 items; SELECT DISTINCT value FROM Table ORDER BY value DESC LIMIT 2 To get the second largest value of a column; SELECT MIN(value) FROM (SELECT DISTINCT value FROM Table ORDER BY value DESC LIMIT 2) AS t Please share i you know of  any other better way.

Read Full Post »

We can use “DISTINCT” keyword with ‘count’ to acheive this; select index, count(DISTINCT number) from <table> group by index;

Read Full Post »

How mysql index works?

The index makes query execution(where, order) faster because it is stored in memory, the corresponding index row can be looked at and it contains a pointer to where the actual data is stored. So MySQL can go to the exact location in the table without having to scan the table Basically an index is a [...]

Read Full Post »

When to use Indexes In MySQL

Indexes are best used on columns that are frequently used in where clauses, and in any kind of sorting, such as “order by”. You should also pay attention to whether or not this information will change frequently, because it will slow down your updates and inserts. Since you wont frequently be adding employees, you don’t [...]

Read Full Post »

The MySQL server can be started manually from the command line. This can be done on any version of Windows. To start the mysqld server from the command line, you should start a console window (or “DOS window”) and enter this command: shell> “C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld” The path to mysqld may vary depending on [...]

Read Full Post »

If you are getting the following error, here is a quick fix that will get you working again. You will need to manually copy the libmysql.dll to the rubybin directory. Search for libmysql.dll file and copy it to the rubybin folder and 

Read Full Post »

When you find this error alert in windows, make sure you do one of the following; Find the LIBMYSQL.dll file and add its location to the PATH(environment-variable) (or) copy LIBMYSQL.dll to the System32 directory.

Read Full Post »