Archive for the ‘Database’ Category
Sunday, June 10th, 2012
MySQL Server doesn’t support the SELECT INTO TABLE syntax. Instead, MySQL Server supports the INSERT INTO … SELECT. Below syntax is equivalent with SELECT INTO in MySQL.
CREATE TABLE mynewtable (
SELECT f2,f3,f4 from tableA,tableB
where tableA.f1 = tableB.f1
Hope it helps,
Tuesday, August 16th, 2011
As a programmer, you will always find a way how to automate your task right ? do you ?
Well, this is my script to get the latest copy of mysql database into my local pc.
echo [%date% %time%] Starting backup...
mysqldump -u root -h 192.168.1.80 -pmyrootpwd mysqldb > mysqldb.sql
echo [%date% %time%] Starting dump....
mysql -u root -h localhost -pmyrootpwd mysqldb < mysqldb.sql
echo [%date% %time%] done.
Save it as a batch file and just double click to run it. Your output will be something like below.
Thats all. Hope it helps.
Monday, July 25th, 2011
Using sqlcmd command from command line, you can connect to your sql server engine.
Below is my sample stored procedure running from command line.
p/s: semakin hari aku semakin malas utk update blog. harap maklum.
Saturday, April 10th, 2010
I’m finally successfully configure my apps to connect to Oracle RAC.
As for my reference later, here is the connection string.
(ADDRESS= (PROTOCOL=TCP) (HOST=server1) (PORT=1521))
(ADDRESS= (PROTOCOL=TCP) (HOST=server2) (PORT=1521))
JDBC URL will be something like this
Thursday, March 11th, 2010
For some reason which I don’t know why, my oracle give me that kind of error.
Googling give me for below solution. And here I post for my future reference, and also for you if you got this same problem .
Run this command first in console.
And after that, use these commands :
SQL> connect / as sysdba
SQL> shutdown abort
ORACLE instance shut down
SQL> startup nomount
ORACLE instance started.
SQL> alter database mount;
SQL> alter database open;