Database

SQL SERVER GENERATE SCRIPTs

SQL SERVER has GENERATE SCRIPT command can export vendor’s database schema and data to the client’s SQL SERVER. Besides, GENERATE SCRIPT also provides various customized options. For example, you can check whether the client’s SQL Server already has the same schema table compared to the vendor’s. You can also choose whether you just want to

SQL SERVER GENERATE SCRIPTs Read More »

SQL Performance

        SQL performance is always a key issue that every DBA faces. This article introduces five ways for improving SQL performance. If subquery is a parameter, then use EXISTS instead IN If you use subquery as a parameter, it is better that you us EXISTS than IN even these two statements return same result, the

SQL Performance Read More »

SQL CASE

When you are familiar with CASE, you can make your SQL statement more flexible and reduce redundant semantics. CASE can be categorized into two cases. One is simple case CASE   WHEN condition THEN result   [WHEN···]   [ELSE result] END; and the other one is searched case CASE expression   WHEN value THEN result   [WHEN···]   [ELSE

SQL CASE Read More »