ArticleDirectory
Comment
Data Synchronization processing (using SQL Server 2000 as an example)
1. Main Purpose
Data synchronization between two or more servers
2. Method
Use the database replication method to synchronize data through publishing, distribut
name to import)-> determine
Restore backup Set-> database-complete
Finally press the OK button. The full database import succeeded.
(If you restore a database on an existing SQL Server database, you may experience a failure to restore it if someone else is using it.
You can go to see-> admin-> Current active-> lock/Object-> Find the process number of the database under lock-> into Query Analyzer kill the l
local database, or even a remote Desktop PC database, on a Pocket PC like on a desktop PC? With SQL Server CE running on the smart device Pocket PC, we can easily access the SQL Server CE database that is placed on the Pocket PC, and you can also use SQL
/* Author: Jiangong SUN */
If you have wondered to clean a table data, and want to save the original data in a backup SQL script.
Here is a solution for it.
Right click your database-> click "Tasks"-> then click "Generate Scripts"
Then you will see an interface: "Generate scripts for database objects ",
-> Click "Next", then "Select specific database
Today, a vendor asked me a question. If you want to change the data type of a field in a table, whether it is a field type in view also responds to automatic changes. At that time, I thought it would be changed automatically. However, the vendors said they had tried and won't change it. They asked me if I had any other choice but to try again. At that time, I thought of the storage process sp_refreshview for refreshing the view and asked them to give
A) Easy to type, update efficiency:Update table1Set Field1=table2.field1,field2=table2.field2From Table2 where table1.id=table2.idb) Conventional way, this is equivalent to a left join, in the outside where is the number of updates, if not add where is all recordsUpdate table1 Set field1=(select top 1 field1 from table2 where table2.id=table1.id)where table1.id in (condition)SQL Server Update table (
During database initialization, an actual problem that administrators need to face is how to import large amounts of data into the database system. Some large-capacity data import and export tools are provided in the SQL Server database for the database administrator to use.
the value to be stored, the default value is 0, and s represents the number of digits after the decimal point.For example: Decimal (15 5), which represents a total of 15 digits, where the integer is 10 bits, and the decimal number is 5.4, NUMERICThe numeric data type is exactly the same as the decimal data type.NOTE: SQL Ser
: first create the primary database FJJDBBK, and then create a table with the same structure as the current database in FJJDBBK. The best way to create these table structures is to use the Generate SQL Scripts function under the Object menu of Enterprise Manager to Generate the Scripts file for these tables, and then select the FJJDBBK database, run the file using the Query Analyzer function in the Tools me
SQL ServerType
C #Type
Exact number
Bigint
Integer Data from-2 ^ 63 (-9223372036854775808) to 2 ^ 63-1 (9223372036854775807) (All numbers ). The storage size is 8 bytes.
Int64
Int
Integer Data from-2 ^ 31 (-2,147,483,648) to 2 ^ 31-1 (2,147,483,647) (All numbers ).
operation subquery (exists means "exists", the subquery behind it does not produce a query result, but instead produces a logical value of TRUE or false, when the word query has a record that is found to be true, Conversely, false to display results only if the subquery result is true)Cases:Use Commodity Management databaseGoSelect customer name, contact phone from Customer information table where exists (SELECT * From Sales Information table where customer number = Customer Information table.
use the stored procedure, instead of using SQL statements to reduce the overhead of the parser.Database ConnectionTo provide ACID (four features of transactions), SQL Server must ensure that all database changes are sequential. It uses locks to ensure that the insert, delete, or update operations of the database do not conflict with each other (for database lock
Today, a vendor asked me a question. If you want to change the data type of a field in a table, whether it is a field type in View also responds to automatic changes. At that time, I thought it would be changed automatically.
However, the vendors said they had tried and won't change it. They asked me if I had any other choice but to try again. At that time, I thought of the storage process sp_refreshview for refreshing the View and asked them to give
, including me, will encounter the same thing during his or her development process. I know why this happens, and I know how to overcome it.
II. Scope of reading
Note that the main focus of this series of articles is "optimizing the performance of transactional SQL Server database data access", but most optimization technologies are also applicable to other datab
server|sqlserver| Data | Statement SELECT table name =case when a.colorder=1 then D.name else ' "End,
--Field ordinal =a.colorder,
Field name =a.name,
--Identify =case when ColumnProperty (A.id,a.name, ' isidentity ') =1 then ' √ ' Else ' "end,
/* Primary key =case when exists (SELECT 1 from sysobjects where xtype= ' PK ' and name
In (SELECT name from sysindexes WHERE indid
In (SELECT indid from Sysindexkey
database more complex tasks, in excle and other tools can be easily completed.
When the contents of the table are modified correctly, the database administrator can import the files from the Excle table directly into the SQL Server database. Because SQL Server is born with
In practice, you sometimes need to import a large amount of data into the database and then use it for various program calculations. In this experiment, we will use step 5 to complete this process and record the time spent by various methods in detail.
The tools used in this experiment are VS2008, SQL server 2000, and
Label:first, Getting started with SQL statements1. SQL statements are statements that are specific to the DBMS "talk", and the SQL syntax is recognized by different DBMS.2. The string in the SQL statement is enclosed in single quotation marks.3. SQL statements are insensitiv
Some code is provided below: C #
Need to reference
Using system. Data. oracleclient;Using system. Data. sqlclient;
Private void button3_click (Object sender, eventargs e) // import data from sqlserver to Oracle{Button3.enabled = false; // prevent multiple clicksInt temp = 0; // used to determine whether the insert is successfulString sqlstr; // receives the inse
, where integers 10 digits, and decimal 5.
4, NUMERIC
The numeric data type is exactly the same as the decimal data type.Note: SQL Server, in order to work with the front-end development tools, supports the maximum data precisio
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.