Skip to content

Alignments main keywords

Tako Lee edited this page Mar 7, 2014 · 8 revisions
  • Main keywords in select/insert/delete/update statement

    • Left align:

      Option: fmt088_align_main_keyword = left, type: TFmtAlign.

      DELETE FROM job_history jh  
      WHERE  employee_id = (SELECT employee_id  
                            FROM   employee e  
                            WHERE  jh.employee_id = e.employee_id  
                                   AND start_date = (SELECT Min(start_date)  
                                                     FROM   job_history jh  
                                                     WHERE  jh.employee_id = e.employee_id)  
                                   AND 5 > (SELECT Count( * )  
                                            FROM   job_history jh  
                                            WHERE  jh.employee_id = e.employee_id  
                                            GROUP  BY employee_id  
                                            HAVING Count( * ) >= 4)); 
      INSERT INTO employees 
                  (employee_id, 
                   first_name, 
                   department_id)  
      VALUES     (113, 
                  'Louis', 
                  100); 
                  
      UPDATE employees  
      SET    department_id = 70  
      WHERE  employee_id = 113;  
    • Right align:

      Option: fmt088_align_main_keyword = right, type: TFmtAlign.

      DELETE FROM job_history jh  
       WHERE employee_id = (SELECT employee_id  
                              FROM employee e  
                             WHERE jh.employee_id = e.employee_id  
                                   AND start_date = (SELECT Min(start_date)  
                                                       FROM job_history jh  
                                                      WHERE jh.employee_id = e.employee_id)  
                                   AND 5 > (SELECT Count( * )  
                                              FROM job_history jh  
                                             WHERE jh.employee_id = e.employee_id  
                                             GROUP BY employee_id  
                                            HAVING Count( * ) >= 4));  
      
      INSERT INTO employees 
                  (employee_id, 
                   first_name, 
                   department_id)  
           VALUES(113, 
                  'Louis', 
                  100);  
      UPDATE employees  
         SET department_id = 70  
       WHERE employee_id = 113; 
Clone this wiki locally