how to set timezone in database

Published on

  In case our application would be spread world wide ,the  timezone variation issue is very common in database world. The below example depicts how to set mysql database timezone to Asian time.                  SET GLOBAL time_zone = ‘+5:30’;                SET GLOBAL time_zone = Asia/Calcutta;    

How to get table column names in mysql

Published on

Way 1 ===== The following syntax used to shows field name ,datatype with all constraints . SHOW COLUMNS FROM table_name FROM database; Way 2 ===== In this case , it shows the column name with ascending order . SELECT column_name FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = ‘table_name’ AND table_schema = ‘database’     ORDER BY column_name;

How to bulk load data into mysql database

Published on

In MySQL Connector,bulk loading of large amount data into table is achieved through  MysqlBulkLoader class. The data’s could be txt or csv files with tab delimiters . It is very speedy way of  inserting data. That loader class provides the  following  mysql statement . Example 1: MySqlConnection connection = new MySqlConnection(conString); MySqlBulkLoader loader = new … Continue reading How to bulk load data into mysql database

reset ms sql sa password

Published on

How to reset ms sql sa password Use command prompt is an easy way to reset ms sql sa password. Step 1. Open a command prompt (Start -> Run -> cmd) Step 2. Type the follow commands, and press Enter after each line: Osql -S yourservername -E EXEC sp_password NULL, ‘yourpassword’, ‘sa’ GO Of course, you … Continue reading reset ms sql sa password