How do access databases convert to SQL Server database?

zhaozj2021-02-16  138

1. The automatic number type in the database database is transformed, and the SQL Server does not set it to an automatic number, we need to add Identity in SQL creation statement, indicate the automatic number!

2. When transformation, with the field related to the date, SQL Server defaults to a SmallDateTime type, we'd better turn it to a DateTime type because the range of DateTime is larger than the SmallDateTime. I met this situation, when using the SmallDateTime type, the conversion failed, and when used with a DateTime type, transformation was successful.

3. The SQL statement that operates in this two databases is not all the same, for example: "Delete * from user where id = 10" is deleted when deleting records: "Delete" User where id = 10 ".

4. The date function is different, in the Access database processing, can be used with Date (), time (), but

In SQL Server database processing, you can only use functions such as DateDiff, DateAdd, and cannot use DATE (), TIME ().

5. In the Access database processing, some VB functions can be used directly in the SQL statement, such as the CSTR () function, but cannot be used in SQL Server database processing.

转载请注明原文地址:https://www.9cbs.com/read-7869.html

New Post(0)