Thoughts:The insert into statement of MySQL is constructed using mssql, saved to a text file, and then imported into the MySQL database.The method is as follows:1. create a mysql table synchronously based on the ms SQL table structure. You can use
1 MySQL supports enum, and set type, SQL Server does not support
2 MySQL does not support nchar,nvarchar,ntext type
3 The incremental statement of MySQL is auto_increment, while MSSQL is identity (1,1)
4 MSMs default values for the table creation
1 MySQL supports enum, and set type, SQL Server does not support2 MySQL does not support nchar,nvarchar,ntext type3 MySQL increment statement is auto_increment, and MSSQL is identity (a)Mysql:create table Basic (ID int key auto_increment,name
Comparison between MYSQL and MSSQL and MYSQLMSSQL
Recently, I was modifying the MSSQL statements related to a company's product to statements that can be executed on MYSQL.
L Advantage Analysis:
MYSQL is short, easy to use, easy to use, and free
To use a function for a recent report, you need to group the data source based on the week sequence of the occurrence date of the record. Therefore, two related sqlfunctions are written for calling.
To use a function for a recent report, you need to
To get the first day of the specified date month, you can use the DateAdd function to subtract the number of days that have elapsed since the month of the specified date.
Copy Code code as follows:
CREATE FUNCTION [dbo].
This article consists of three parts, collecting several methods for processing MSSQL datetime on the Internet. Here, we will sort the data according to my collection order.
Part 1: SQL statistics for this month and this weekStatistics for this
First, given a date value, find out the date data for the Monday and Sunday of the week in which this date is located
For example, given a date of 2010-09-01, find out where it is in the week of Monday is 2010-08-30, Sunday is 2010-09-05
function
Usually, you need to get the current date and calculate some other date, for example, your program may need to judge the first or last day of one months. Most of you probably know how to split dates (year, month, day, etc.), and then just use the
1. Given a date value, obtain the date data of the Monday and Sunday of the week where the date is located.
For example, if you specify a date, find that its Monday of the week is, and Sunday is.
Function is created as follows:Copy codeThe Code is
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.