Posts

Showing posts with the label MySQL

Donate

Setup SQL Developer To Connect To A MySQL Database

1. Download sql developer from oracle site 2. Copy sql developer to drive C:\ 3. Copy msvcr71.dll to %WinDir%\System32 [reference: http://gisbiz.com/2011/05/fixing-the-sql-developer-msvcr71-dll-error/] msvcr71.dll is located in: [sqldeveloper\jdk\jre\bin\msvcr71.dll] 4. Download mysql-connector-java-5.0.8-bin.jar zip file from this site: Download MySQL connector Java 5. Extract mysql-connector-java-5.0.8-bin.jar in sql developer lib folder: C:\Users\gnesguerra\Downloads\sqldeveloper-3.0.04.34\sqldeveloper\lib 6. Setup sql developer to connect to mysql database using the tutorial from this site: Starting from Setting it Up Paragraph: Configuring SQL Developer for MySQL    6.1 Click Choose Database button below Port label.    6.2 Beside the Choose Database button, select the database you want to connect to from the dropdown control.    6.3 Zero Date Handling should be set to null    6.4 Click Connect 7. (Increase Operation Timeout)    7

Retrieve Record Counts For All Tables In MySQL DB

Reference: Get Record Counts for All Tables in MySQL

Format Query Result By Count() With Comma Using Format() In MySQL Database

I played around with MySQL count() statement. I found it annoying that the count() will simply return whole numbers. Example: the total record of a table is 32,272. In MySQL SQL, this will simply return 32272. Below are two sql scripts. The first one returns whole number,while the second query returns comma separated number. ENJOY!!!! select count (*) as num_records_notformatted from mytable where name like '%j%' ; Solution: select format( count (id),0) as num_records_formatted from mytable where name like '%j%' ;

Donate