SQL SERVER 2005 has a timed task and you can start it. But for more intuitive control, write directly a program that executes your stored procedures on a regular basis.
1, set up the SQL Server Agent (SQL Server Agent) service started with the
When you add a row to a database table, this function is useful when inserting a specific value for the self-added column, such as the table structure:
ID | Text
1 | A
2 | B
4 | D
Where the ID column is from the previous column, if we want to
1.SQLSERVER database to change the bit type to not Boolean (that is, to change true to False;false to true)
Example: Update table set bit field =bit field-1
Recently a friend asked me, he said that he deleted millions of to tens of millions of data
SQL Server restores the master database by rebuilding the following details
1. Backup master Database
2. Stop service, delete master data file directly
3. Rebuild Master data file with Setup program
Access to the installation directory
1, the vertical table to the horizontal table
Vertical table Structure Table_a:
Converted structure:
SQL example for vertical table to horizontal table:
SELECT Name,
sum (case when Course = n ' language ' THEN Grade
ELSE 0
) as
Copy Code code as follows:
With Fw_requestion_note_temp (old_apply_id) as (--take the root node into the temporary table
SELECT old_apply_id from fw_requestion_note--where old_apply_id = ' E741470e-8b5c-4f91-9b03-c7474d103aef '
--data that
A view is a common database object that stores the results of a query as a virtual table in the data. Because the view has a lot of advantages: 1, you can simplify the operation, 2, you can set up front and back buffer, 3, you can merge the split
MS SQL is good, but after a while, the database becomes large and the actual amount of data is small. Are generally caused by the database log! The database log grows up to hundreds of M.
The online MSSQL virtual host price is also expensive, to
In the previous article to introduce you to SQL Server execution plan cache (above), this article continues to introduce SQL Server implementation plan cache related knowledge, small partners to study together.
Brief introduction
In the previous
Recently, a friend of mine asked me, he said that he deleted millions of to tens of millions of data in SQL Server is very slow, to help him analyze, some of the following comments, may be useful to many people.
If your hard disk space is small and
Many SQL Server programmers are confused about the use of subqueries (subqueries), especially for nested subqueries (that is, a subquery that contains a subquery). Now, let's look at this question in the right way.
There are two types of seed
Copy Code code as follows:
--View the current database state 1 to have full-text indexing enabled
SELECT databaseproperty (' Database name ', ' isfulltextenabled ')
--Open Fulltext function
Execute sp_fulltext_databse ' Enable '
Their corresponding relationship can refer to the following diagram of the relevant test examples are as follows:
The relevant test examples are as follows:
Copy Code code as follows:
Use tempdb
Go
if (object_id (' T1 ') is not null)
Supports all versions of SQL Server.
Do you need to connect to the database? Here's a piece of code that shows how to query and get SQL data, simply configure your account information, server address, and SQL statements very simply and correctly:
Many people look at the SQL statement waiting for the time is through the sys.dm_exec_requests view, waiting for the type is also through Wait_type, Sys.dm_os_waiting_tasks can see the session waiting so what is the difference? ....
No more
Package JSP;
Import java.sql.*; JDBC Package
public class Sql_data {
String url = "Jdbc:inetdae:192.168.2.70?sql7=true"; Use your hostname and port number
String login = "sa"; Use your Login
String password = ""; Use your password
Public Connection
After you install SQL Server 2102, run the Management Studio connection database with an error:A similar error was found on the web. Original link: http://www.jb51.net/article/59352.htmlThe process is as follows:1. Open SQL Server Management
ObjectiveFor a long time did not touch the database, the weekend at home to write a report of the stored procedures, a time to use the stored procedures to achieve paging and calculate the total number of records do not know how better to achieve.
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.