Good Team Plays Hard
In: MS SQL
3 Jul 2009MERGE is a new feature that provides an efficient way to perform multiple DML operations. In previous versions of SQL Server, we had to write separate statements to INSERT, UPDATE, or DELETE data based on certain conditions, but now, using MERGE statement we can include the logic of such data modifications in one statement that even checks when the data is matched then just update it and when unmatched then insert it.
One of the most important advantage of MERGE statement is all the data is read and processed only once. In previous versions three different statement has to be written to process three different activity (INSERT, UPDATE or DELETE), however using MERGE statement all update activity can be done in one pass of database table. This is quite an improvement in performance of database query.
In: Gadget News
1 Jul 2009In: Gadget News
23 Jun 2009In: MySQL
22 Jun 2009Recently I am trying to compile a report from MySQL database using “order by” clause to sort the priority_no field. However I discover the result is not in order at all. Then I try to check out the data type of priority_no field and discover that it is configure as varchar. So I just use the quick fix below and got the job done:
mysql> SELECT priority_no FROM table_name ORDER BY priority_no+0;
In: Leisure
21 Jun 20092009 深圳, 香港, 澳門 汽車展
In: Gadget News
19 Jun 2009This is a place I create just for fun and to write down some experience and notes for myself. So feel free to enjoy and drop any comments you have. I had been employed as Programmer, System Analysts, System Administrator, DBA and Project Manager. I will share some of my case study here as well. Enjoy!
Recent Comments