In the Web, security is mainly reflected in two aspects: one is
Program Security: prevents malicious webpage insertion.
Code The other is database security, which we can often back up the database to achieve.
In this article, I will demonstrate
SQL Server should convert data into scripts and then convert data. Direct data import will invalidate the primary and Foreign keys and constraints.
Use the built-in import and export work SQL2000. Fortunately, sql2005 always has some inexplicable
recently, data has to be transferred from one database to another. During this period, there are many problems related to the conversion of some strings to the time type, so I can refer to my remarks as a memo.
Case when cnct_char31 like '[12] [0-9]
Original article: http://blog.csdn.net/iwteih/article/details/4515267
Used by colleagues todayCodeThe stored procedure call times out and runs in SQL Server Management studio, but the result is very quick. This is the same as the last time I
1. Table P is as follows:
Question: Calculate the product name and the difference quantity in red and blue in the table.
(1) first, it is divided into two temporary tables.
Use tempdbGoIf object_id ('# Table1', 'U') is not null // you can check
I almost got a problem with a database with 1 kW data.
Finally, I found a recovery method on the Internet,
The original article is as follows:
Place the file to be restored in the data file in ms SQL, and after entering the ms SQL master
Restore the SQL Server database to a certain time point through logs: 2008/02/11 A. M. -- prerequisites: the database model cannot be "simple"; otherwise, it cannot be recovered. -- Create database dbgo -- back up the database to disk = 'C: \ dB.
--
1. Create a UDF: truncates a string from the last specific character.
Create
Function
Fn_getlastcharindex (
@ Chars
Varchar
(
1000
),
@ Char
Varchar
(
10
))
Returns
Varchar
(
1000
)
Begin
Requirement: three data entries in the table are randomly selected. The value of the price field in the three data entries must be between and.
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
SQL Server exports and imports data in the following ways:
The import and export interface is provided in SQL Server.
The interface operation is divided into two modes: Copy data of one or more tables or views, and write query to specify
An error occurred while installing SQL Server today:
PreviousProgramInstall a file that has been suspended on the installation computer. You must restart the computer before running the installer !.
After that, it is still unavailable to
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
1
--
Create a cursor
2
Declare
Curuser
Cursor
For
3
Select
Top
30
Email
From
Dbuser
4
Check whether the server IP can be pinged.This is to see whether the physical connection to the remote SQL Server 2000 Server exists. If not, check the network and check the configuration. Make sure that the IP address of the Remote SQL Server 2000
Database Table A has 100,000 records, and the query speed is normal. However, after importing one thousand data records, the problem occurs. When the selected data is between the original 100,000 records, the speed is still quite fast; but when the
1. Insert multiple data entries into the table using the Union keyword.Insert into users ([name], password, nickname)Select 'aaa', 'bbbb ', 'cccc' UnionSelect 'dfdf ', 'dfdf', 'dfdsf' UnionSelect 'edtrer', 'dfgg ', 'dfgfg'When Union all is used, the
Previous ArticleArticle"Sharing well-made knowledge management system blog backup program site rebuild" has mentioned how to use site rebuild to download your favorite blog articles, however, the downloaded files cannot be imported into the database,
First, a complex method is provided to compress logs and database files as follows:
1. Clear logs Dump transaction database name with no_log 2. truncate transaction logs: Backup log database name with no_log 3. Compress database files (if not
Sqlserver subqueries can be divided into two types: Related subqueries and nested subqueries. Premise: assume that the books table is as follows:
Category Number book name Publishing price--------------------------------------------------------2 C #
Newid ()
Randomly retrieve 10 records from Table A using
Select top 10 * From northwind. DBO. Orders
Order by newid ();
Or
Select top 10 *, newid () as random from northwind. DBO. Orders
Order by random;
In SSMs, we can see that their
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.