Tags: BSP new insert Update EFI version select Ble upd1) Update table (another table)A) Easy to type, update efficiency: Update table1 set field1=table2.field1,field2=table2.field2 from table2 where table1.id=table2.id b) Conventional way, this is equivalent to a left join, in the outside where is the number of updates, if not add where is all records Update table1 set field1= (select top 1 field1 from table2 where table2.id=table1.id) where table1.id in (condition)2) Delete a columnALTER TABLE
This article original website: http://blog.csdn.net/htl258/article/details/5695391------------------------------------------------------------------------------------author:htl258 (Tony)--Date: 2010-06-25 22:23:18--version:microsoft SQL Server (RTM)-10.0.1600.22 (Intel X86)--Jul 9 2008 14:43:34- -Copyright (c) 1988-2008 Microsoft corporation--Developer Edition on Windows NT 5.1 Data manipulation between
Install freetds in Ubuntu to access sysbase and Microsoft SQL Server databases.
To access sqlserver in Linux, use freetds!
: Http://www.freetds.org
CD: Enter the directory where freetds is located. (For example, CD/root/usr/local/freetds) there is a space after CD.
For example, my directory is as follows:
$ Tar zxvf freetds-stable.tgz (unzipping)
Enter the
Today the customer gave an Excel data, need and my local library data to do contrast, do not want to use the UE initialization, feel very troublesome, finally found a formula on the net slightly modified a bit to solve, memo as follows:
Add a column to the column you want to insert in Excel, and then enter the following code (please replace A2 and B2 with your own cell name, separated by commas in the English state)=concatenate ("INSERT into B_code (N_code, C_name) VALUES ('", A2, "', '",
The first step, Control Panel---Management tool---ODBC Data source---User DNS---Click Add, fill in the configuration and save according to the connection data information (one of which is "change the default database to", click and modify to need to configure the database)Step two, open powerdesigner, build a physical data modelThird step, after the new success, click on "Database", "Connect", connect to the data source just added.Fourth step, click "Database", "Reverse Engineer database ..." (U
more information on this, see SQL Server–introduction to Service Broker. Database Mail will keep a copy of the e-mail sent, and we can pass sysmail_allitems, Sysmail_sentitems, sysmail_unsentitems , sysmail_faileditems to inquire . The sending status of the message will be saved in the sysmail_mailitems table , and when sent successfully, the Sent_status column in the table will be displayed as 1; When se
Sent_statusThe column will be displayed as 1; When sending fails,thesent_status column will be displayed as 2, 3 whennot sent . as shown below, the log file can beSysmail_logview in the table Span style= "FONT-SIZE:9PT; Color:blue ">SELECTNBSP; * FROMNBSP; sysmail_mailitems Span style= "FONT-SIZE:9PT; Color:black "> GO SELECTNBSP; * FROMNBSP; sysmail_log GO The Send status can be Sysmail_sentitems validation in the table .After you send it, you can ch
are recorded in a data table,When the Merge Agent runs, it collects GUIDs in the data tables that indicate which rows were modified at the publisher and at the Subscriber. For data that is modified only at the publisher or at the Subscriber, the corresponding actions are made directly, such asInsert,update,delete, if both parties have a GUID, the conflict is resolved in a user-specified manner, and the default publisher
appropriate for transactional replication in the following various scenarios:
You want the incremental changes to propagate to subscribers when they occur.
When changes are made from the Publisher to the Subscriber, the application needs to have a low latency between the two.
The application needs to access the intermediate data state. For example, if a row is changed five times, transactional replication allows the application to respond to each change, not just the final data
', ' 95 ', ' running ') 7. Query average score?Select AVG (score) as average scoreFrom Student-18. Query the surname Zhang?SELECT * FROM Student-1Where name like ' Zhang% '9. Use truncate to delete all dataTRUNCATE TABLE Student-1 Write so many examples just hope that everyone ingenious, this case is a student score table to do the demonstration, in exchange for other tables, the syntax is the same, this article is just a basic T-SQL statement, follo
execute, meet the conditions after execution, equivalent to an event in HTML Create TRIGGER Trigger Name Insert_student-Name Specification Action _ The name of the table to be executed in order to understand the circumstances of the trigger to be used more easily On Student-pin for that watchFor insert--triggers for that action --onclick= "Show ()"AsCode to be executed by the triggerGo 1. For means to trigger after the action is executed2, instead of Delete means that the deletion before the th
Label:--View the table information in the database,--include (table name, number of records, reserved space, use space, index use space, unused space)execsp_msforeachtable@precommand=N'CREATE TABLE # #01 (table name sysname, number of records int, reserved space Nvarchar (10), Space varchar (10), index using space varchar (10), unused space varchar (TEN))',@command1=N'Insert # #01 exec sp_spaceused"'?" ",@postcommand=N'select * FROM # #01 The order by record number'Drop Table## on--to view the p
Mainly used in small databases and infrequently changed data
2. Full Recovery model
You can prevent loss of data in the largest possible range, including database backups and food log backups, and provides comprehensive protection. This mode uses a backup of the database and all logs to restore the database
3. Bulk-Logged Recovery model
Under the full recovery model, all large volumes of data import and export operations produce fewer logs, and he lo
It is said that the use of Hibernate framework can easily enable your research and development platform to support a variety of different types of databases, but the practice shows that the "easy" here is relative.It's not a simple thing to have a research platform that supports multiple databases, but it can be said that it's not possible to do so with the hibernate framework.The following is a record of t
"clean" as Oracle's Reflection, which includes: Developer, Workgroup, and SQL Express. For example, a witness server can be any version, but if you want to take a snapshot of the mirror server, you need the enterprise or the development version. (www.3lian.com)
Their recovery status begins in the process of setting up partners (partner, which typically consist
Tags: c A file work with dataMicrosoft SQL Server has four system databases:The 1.master database master database records all system-level information for the SQL Server system. It records all login accounts and system configuration settings. The master database is a database that records all other
exists or another file with the same name already exists, an exception is thrown.If you pass an empty string for the connection string, the new database file overwrites the old database file.But the name remains unchanged.SqlCeEngine engine = new SqlCeEngine ("Data source=adventureworks.sdf");Engine.compact (NULL);Engine.compact ("Data source=; PASSWORD=A@3!7F$DQ; ");
4. Shrinking the Database
Shrink DatabaseBy moving an empty page to the end of the file and then truncating the file,To reclaim
allowed. 4. User-defined integrity rulesA user-defined complete rule is a constraint on a specific data that is determined by the application environment. It reflects the semantic requirements that the data involved in a particular application must meet. The system provides a mechanism for defining and verifying such integrity so that it can be processed using a unified system approach, which is no longer for the application to undertake this work. Entity integrity rules and domain integrity ru
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.