Skip to content
Tako Lee edited this page Mar 7, 2014 · 8 revisions
  • Main clause newline option

    Option: fmt057_update_table_in_new_line = false, type: TFmtBoolean.

    Option: fmt059_update_set_clause_in_new_line = false, type: TFmtBoolean.

    Option: fmt060_update_where_condition_in_new_line = false, type: TFmtBoolean.

    UPDATE employees 
    SET    department_id = 70,dname = 'sales',location = 'ca' 
    WHERE  employee_id = 113; 

    Option: fmt057_update_table_in_new_line = true, type: TFmtBoolean.

    Option: fmt061_update_table_indent = n, type: int.

    Option: fmt059_update_set_clause_in_new_line = true, type: TFmtBoolean.

    Option: fmt063_update_set_clause_indent = n, type: int.

    Option: fmt060_update_where_condition_in_new_line = true, type: TFmtBoolean.

    Option: fmt064_update_where_condition_indent = n, type: int.

    UPDATE 
      employees 
    SET    
      department_id = 70,dname = 'sales',location = 'ca' 
    WHERE  
      employee_id = 113; 
  • Set clause items fit into one line

    • Items in the same line as SET keyword
    UPDATE employees 
    SET    department_id = 70,dname = 'sales',location = 'ca' 
    WHERE  employee_id = 113; 
    • Items in new line, indent from 0 to n
    UPDATE employees 
    SET    
      department_id = 70,dname = 'sales',location = 'ca' 
    WHERE  employee_id = 113; 
  • Stacked set clause items

    • Items in the same line as SET keyword
      • Comma in the end of line

        UPDATE employees 
        SET    department_id = 70,
               dname = 'sales',
               location = 'ca' 
        WHERE  employee_id = 113; 
      • Comma in the begin of line

        UPDATE employees 
        SET    department_id = 70
               ,dname = 'sales'
               ,location = 'ca' 
        WHERE  employee_id = 113; 
      • Comma in the begin of line, align items.

        UPDATE employees 
        SET    department_id = 70
              ,dname = 'sales'
              ,location = 'ca' 
        WHERE  employee_id = 113; 
      • Comma in the begin of line, align items. space between comma and item is 1 or n

        UPDATE employees 
        SET    department_id = 70
             , dname = 'sales'
             , location = 'ca' 
        WHERE  employee_id = 113; 
    • Items in new line, indent from 0 to n
      • Comma in the end of line

        UPDATE employees 
        SET    
          department_id = 70,
          dname = 'sales',
          location = 'ca' 
        WHERE  employee_id = 113; 
      • Comma in the begin of line

        UPDATE employees 
        SET    
          department_id = 70
          ,dname = 'sales'
          ,location = 'ca' 
        WHERE  employee_id = 113; 
      • Comma in the begin of line, align items.

        UPDATE employees 
        SET    
          department_id = 70
         ,dname = 'sales'
         ,location = 'ca' 
        WHERE  employee_id = 113; 
      • Comma in the begin of line, align items. space between comma and item is 1 or n

        UPDATE employees 
        SET    
           department_id = 70
         , dname = 'sales'
         , location = 'ca' 
        WHERE  employee_id = 113; 

Clone this wiki locally