Introduced
In many cases, we need to save the picture to the database. In some applications, there are sensitive information that cannot be stored in the file system because any pictures stored on the file system are easily accessible to users.
This
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
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
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
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 '
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 solution is simple,Right-click the database attribute, select a file from the menu on the left, and change the owner to sa.Of course, you can also directly execute The code is as follows:Copy code Use [your database name]EXEC
The first method isThis method is to uninstall "Microsoft SQL Server 2013 (2012) Express LocalDB": choose "start"> "control"> "add deletion program"> "Microsoft SQL Server 2013 (2012) Express LocalDB". Click "Uninstall" and restart the computer.
1. Log compressionThe command is simple.Dump transaction [Database name] WITH NO_LOGBackup log [Database name] WITH NO_LOGDbcc shrinkdatabase ([Database name])Example 1 The code is as follows:Copy code # Sql2005 log compression "sqcrm2009" for
Hello everyone, I haven't written anything for a long time. Recently, I 've been playing Starship in Haofang. Even if I don't even recognize it, I still have a bright future when I come back to develop a database, at least I can barely find that
Recently, the stress test in the project encountered a database deadlock problem. In short, the following code causes a deadlock at the SERIALIZABLE isolation level: The code is as follows:Copy code SELECT @ findCount = COUNT (id) FROM
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service