Ms SQL Server Stored Procedure batch modify user table owners
Create a login account and set login to the database to be modified.
Create storage process
Create procedure DBO. changename@ Oldowner as nvarchar (128), -- original parameter owner@
After a project is completed, there will be a lot of useless test data in the database. You can use Delete * to delete all the data, but the base of the Self-increasing column (usually the primary key) will not be zero, you can use the truncate
Use convert:
Cast ('as type to be converted) "cast (6865.6445 as varchar (10 ))Convert (type, to be converted, 112) convert (datetime, stringdate, 112 );
Convert (data_type [(length)], expression [, style])
ParametersExpression
Is any valid
NullIt is a very special and annoying value. The calculation result of any value and null is null, which often leads to statement errors. Therefore, when designing the database table structureDefaultTo avoid null. However, this will increase the
Make an encryptionProgramTo obtain the MAC address of the current server, but it is not that simple. Most of the recommended network methods use xp_mongoshell to execute ipconfig/all, and then write the extended storage process on your own. But we
SQL Server 2000 SP4 new features overview Author: changelive Source: saide.com
[Abstract] Microsoft is about to make many changes to SQL server: all new SQL Server 2005, attractive SQL Server express and SQL Server 2000 Service Pack 4.
Support for SQL Server 2000 DTS package design
You cannot open or edit the DTS package directly in Business Intelligence Development studio. In addition, SQL Server 2005 does not install the DTS package designer used to edit the DTS package.
If you want to remember the records in a table for random display or randomly extract a record, we do not need to write a long string
Program
Code How can we create a random number and then make a so-called "random record"? You only need to use a
Use SQL Server/SSB
Implement pub/sub
Integration Mode In the field of software development, new development tools often introduce new and reliable mature platforms. This technology applies to SQL Server 2005 service brokers. Service Brokers
In the project implementation process, many users need to develop a new SQL Server-based system. After the system is accepted, it should be merged with an original SQL server system, A single server is shared, so a separate server cannot be provided
The reason for combining these two databases is that ms SQL Server is the third generation product of Sybase SQL Server launched by Sybase in 1987, also known as the University edition Ingres, so they are essentially the same.The new version of SQL
You can see this on the blog of Lulu's senior brother.
Article , Very practical. Add it to favorites.
MS-SQL Server Database Development
1. sort by strokes of the Last Name:Select * From tablename order by customername collate
Private sqlconnection mycnn = NULL;// Save the image to the databaseMycnn = new sqlconnection (@ "Server = zhurongj; database = my1; trusted_connection = yes ");Mycnn. open ();Sqlcommand mycmd = new sqlcommand ("Update picture set picture = @ A
For new database programming, we may have some questions about "null". For example, if all the data in a new table is displayed as , after manually adding and deleting text, it becomes blank again. A string-type field is not explicitly filled in,
In fact, you only need to use the built-in storage process sp_spaceused to obtain table-related information.
For example, sp_spaceused 'tablename'
The following is a stored procedure for writing convenience. The purpose is to store all the
1. A trigger is a special stored procedure. It cannot be explicitly called. Instead, it is automatically activated when a record is inserted, updated, or deleted into the table. Therefore, triggers can be used to implement complex integrity
Generally, you need to obtain the current date and calculate some other dates. For example, your program may need to determine the first or last day of a month. Most of you probably know how to divide a date (year, month, day, and so on ), then,
Not long ago, I suddenly saw a colleague still using SP _ to start the stored procedure on SQL Server. So I gave him the msdn link, which is a typical example.
A long time ago, I helped a company with a stored procedure. It was said that it would
Document directory
Webcast
Preface
I have learned the importance of the index from the importance of the index of the last returned data, but my experience may not be clear about the indexes that need to be created, in addition to the local
Document directory
Data Source
I really don't know what the difference is. Isn't it all an index? Later, I learned it only after reading msdn for a moment. I first explained it with my own meaning, attach the original text.
Clustered: the
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.