A few days ago, I found that the query on the website is abnormal. Generally, the content of the first-level directory is queried first, and the second-level directory is queried after I click the first-level directory ...... Until the bottom file
Declare @ I intSet @ I = 'A'Set @ I = cast ('A' as INT)Set @ I = convert (INT, 'A ')Print @ I-- Syntax error occurs when the varchar value 'a' is converted to an int column. This is different from Java.
Declare @ ch varchar (90)Set @ CH = 97Print @
The initial idea is to use two recordsets, one for retrieving data from SQL, and the other for inserting data into access.
Because the table has many fields, you have to use a loop.
CopyCodeThe Code is as follows: While (! M_precordset_ SQL->
SQL Server often has the following problems:
After a table uses columns with automatic numbers, tens of thousands of columns have been automatically numbered due to a large amount of data being tested. Now we are using this table, and the test data
When using SQL Server, the most common problem you encounter is that the connection fails. Generally, there are two ways to connect to SQL Server. One is to use the client tools provided by SQL Server, such as the Enterprise Manager, query analyzer,
Topic: list all databases on the SQL Server
Code
First, the DBO permission is used to list all databases on the server.
Copy codeThe Code is as follows: Dim srv
Dim objdb
Set SRV = server. Createobject ("sqldmo. sqlserver ")
SRV. logintimeout =
In development tools, database design, Applications
Program The structure, query design, interface selection, and other options depend on the specific application requirements and the skills of the development team. This article takes SQL Server as
First case: Do I need to back up the database if I have raid?
Answer: Yes. With raid, you can repair the database if some disks are damaged. In some cases, the database can continue to be used. But what if one day your colleagues accidentally
/* Stored Procedure */
Sp_databases -- list all databases on the server
Sp_server_info -- list server information, such as character set, version, and order
Sp_stored_procedures -- list all stored procedures in the current environment
Sp_tables --
In a large database, data changes are very frequent.
Indexes built on these data also need to be maintained frequently.
Otherwise, these data indexes will not play an appropriate role. It may even become a burden on the database itself.
We need to
1. Enable the database to support SQL high-speed cache dependencies.
2. Enable the table to support SQL high-speed cache dependencies.
3. ASP. NET application
Program The Web. config file contains the SQL connection string.
4. Use SQL high-speed
-- 1
Use master
Backup database logtest
To disk = 'd: \ Program Files \ Microsoft SQL Server \ mssql10.mssqlserver \ MSSQL \ backup \ logtest. Bak'
With format
-- 2Use logtestCreate Table table_1 (ID int, test varchar (max ))Insert table_1 (ID,
I tracked the login process of the SQL server database SERVER and found that password computing is very fragile. The weak password of the SQL SERVER database reflects two aspects:
1. Password Encryption Algorithm for network login
2. Password
Recently, a friend asked me that it was very slow for him to delete millions or tens of millions of data from SQLSERVER. He analyzed the problem and gave some comments as follows, it may be useful to many people.
If your hard disk space is small
In a recent project, the server is deployed on a special data center. due to security concerns, we cannot provide FTP services to our developers. Therefore, we have to take a look at each version update, his data center is far away, so I have been
Last Friday, we made a php connection to both the mysql database and the sqlserver database.
I have been using mysql for a long time and I am not very familiar with sqlserver. None of them, at least mysql and sqlserver, are relatives.
When
The following method can be used to quickly generate a batch of data
If (object_id ('T') is not null) drop table tGoCreate table t (id int identity (1, 1), name varchar (40 ))GoInsert into t (name) select newid ()Go 10Select * from t/*1 18C1C418-9
At that moment, my heartbeat reached my blind eye.
Run the Account creation command. OK!
Remote Login, enter the account, password, OK! Finally, I went in again!
*
I suddenly found that the database server could not be logged on.
The system prompts
In actual work, especially in the production environment, the optimization of SQL statements is very important, and it also plays a significant role in improving the database performance. we are always complaining about machine performance problems,
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.