1. Execute the command line to import a large file SQL script:
Osql-s 192.168.0.97-U sa-P 123-d job-I j: \ persontb1_edit. SQL
2. Views are commonly used for a large number of queries, which will significantly increase the speed and reduce the number of queries. Remember, the number of database queries is often the biggest factor affecting the speed.
3. If you want to add a unique judgment to the column but do not want to take effect for null, it means that null can exist repeatedly, so you cannot use the unique constraint of unique, which must be implemented using a trigger.
Example:
Create trigger t_check_sz_id_number on jf_quodao_record_tbl
For insert, update
Begin
If (select max (CNT) from
(
Select count (I. sz_id_number) as CNT
From jf_quodao_record_tbl T1, inserted I
Where t1.sz _ id_number = I. sz_id_number
Group by I. sz_id_number
) X
)> 1
Rollback tran
End