Brief introductionThe Bulk Insert command differs from the bcp command in that it is a SQL Server script statement that can import local or remote file data into a database in bulk, very quickly, and the remote file must be shared.The file path must
1. First day of last monthSELECT CONVERT (CHAR), DATEADD (Month,-1,dateadd (Dd,-day (GETDATE ()) +1,getdate ()), 111)2. Last day of last monthSELECT CONVERT (CHAR), DATEADD (Ms,-3,dateadd (mm, DATEDIFF (Mm,0,getdate ()), 0)), 111) + ' 23:59:59 '3,
Directory
Directory
Correctly scaling and shrinking SQL Server data database files
Resources
Correctly expanding and shrinking the SQL Server data (database) fileAfter creating the MS SQL Server database,
Creating tables and entering dataCREATE TABLE STUDENT(SNO VARCHAR (3) Not NULL,SNAME VARCHAR (4) Not NULL,SSEX VARCHAR (2) Not NULL,Sbirthday DATETIME,CLASS VARCHAR (5))GoCREATE TABLE COURSE(CNO VARCHAR (5) Not NULL,CNAME VARCHAR (Ten) is not
1, what is the database separation and additionalDatabase separation:Detaching a database is removing a database (such as Student_mis) from the list of SQL Server databases so that it is no longer managed and used by SQL Server, but the database
SQL Server Operations XML example/*Getting Started with SQL xml:--by jinjazz--http://blog.csdn.net/jinjazz 1, xml: Can recognize elements, attributes and Values 2, XPath: addressing language, Similar to the Windows directory lookup (not used by the
--the first day of last month SELECT CONVERT(CHAR(Ten),DATEADD(Month,-1,DATEADD(DD,- Day(GETDATE())+1,GETDATE())),111) SELECT DATEADD(MM,DATEDIFF(MM,0,DateAdd(Month,-1,getdate())),0) --the last day of last month SELECT CONVERT(CHAR(Ten),DATEADD(MS,-
Frequently encountered problems with databases:1), database file space exhausted 2), log file growth 3), database file cannot shrink 4), autogrow and auto shrinkThis series is based on the above 4 questions to analyze and summarize the database
Explanation of the Checkpoint:For performance reasons, the database engine modifies the database pages in memory (buffer cache), but does not write these pages to disk after each change. Instead, the database engine periodically issues checkpoint
Microsoft SQL Server 5030 Error ResolutionToday when using SQL Server, because the database was previously created forgot to set collocation, the database inserted Chinese characters are garbled, so into the options of the databases to modify
After you enable the Reporting Services feature on an existing SQL Server SP1 database, you find that you cannot configure the reporting database, such as an error.Provider: Named pipe provider error:40-Unable to open a connection to SQL Server650)
Built-in functions in sql:--aggregate function count--the number of data in the query tableSelect fromSelect COUNT (*) from the person where age in (18,19,20)--all functions that can be spoken with the previous section you
Usually we have several commonly used aggregate functions to calculate the data for a table in a database1, Count: counting2. Sum: Calculate sum3, Avg: Averaging4, Max: Take maximum value5, min: Take the minimum value6, IsNull: When the return data
Create:[SQL]View PlainCopy
Create Trigger Trigger_name
ON {table_name View_name}
{for after Instead of }
[ Insert, Update,delete]
As
Sql_statement
To delete a trigger:[SQL]View PlainCopy
Drop Trigger
A cursor is a way of working with data, and in order to view or manipulate the data in the result set, the cursor provides the ability to move forward or backward through the data in the result set one time, either in rows or in multiple rows. We
When you are finished configuring mirroring, right-click Database----database mirroring Manager----Server connection when you find a linked mirror fails with the prompt message: replication requires an actual server name this error message online
To test SQL performance:One, by setting statistics to view the system situation when executing SQL. Options: Profile, O, time.SET STATISTICS profile on: Displays the time, in milliseconds, that is required to parse, compile, and execute the
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.