Many stored procedures are often written during database system development. To unify the format and simplify the development process, I wrote some stored procedures to automatically generate stored procedures. The following is a brief introduction
1. view the database version
Select @ version
2. view the operating system parameters of the machine where the database is locatedExec master .. xp_msver
3. view database startup parametersSp_configure
4. view the database startup timeSelect
If you are interested in MSSQL user information, you may find the Master. DBO. sysxlogins stores user passwords. However, if the password field is not null, It is a bunch of binary files that cannot be understood. How is this password encrypted?
In
The full-text retrieval method of SQL 7 is similar to that of Index Server.
ContainsAnd, or, notLogical expressions can be easily used in contains.Example:Select username from member where contains (userinfo, '"Writer" and "Carpenter "')Select
With the increasing demand for enterprise-level high-performance databases, users often need to switch from the file-Server environment of the Microsoft Access Jet Engine to the customer-Server environment of Microsoft SQL Server. In Microsoft
The following describes how to use SQL Server to implement a dynamic FAQ (FAQs and answers) website.
First, create a database faq. The table faqs contains the field id (int, auto increment, and set as the primary keyword), subject (varchar, 200),
A project was created last time, involving database restoration and restoration. I found it online and implemented it using SQLDMO. Just add SQLDMO reference, then, use the method of the following class to implement it.
I expanded the original
An example code used to back up and restore an SQL Server database using asp, hoping to be useful to some friends. (Note: the database may not be recovered during use)
Copy codeThe Code is as follows:
SQL Server database backup and recovery
Question: Suppose there is a student orders table (tb) as follows:Name course scoreZhang San Language 74James math 83Zhang San physical 93Li Si language 74Li Si mathematics 84Li Si physical 94(The following result is displayed ):Name, Chinese,
A B c d
980515 Excellent Enterprises Limited Company Jia Hao NULL
980514 quanxin Wood Industry Co., Ltd. NULL 123
980514 Xunyi Technology Co., Ltd. fengfengyu NULL
980515 Yue guoyu Enterprise Co., Ltd. NULL 111
As shown in the table structure above,
The table structure we use is as follows:
The relationship between the three tables is:
The existing test data is as follows:
The result is:
Copy codeThe Code is as follows:DECLARE @ strSQL VARCHAR (8000)SET @ strSQL = 'select t. STUNAME
According to network conditions, the latency may reach about 10 seconds, that is, the content added, deleted, and updated to the primary database can be synchronized to the standby database within 10 seconds.
The three-minute video operation is
Inserted and deleted are two temporary tables used in the trigger. When the insert operation is executed, the inserted records are stored in inserted. When the delete operation is executed, the deleted records are stored in deleted. When update is
For example, enter 12345, and the program will show you:For example, enter 10023040, and the program will provide the following information:One solution (tested in SqlServer2000 ):Create function fun_cgnum(@ Num INT)Returns varchar
1. pagination of all records:Select top page size *FROMUsersWHERE(Id not in (select top (page size * (page size-1) id from Users order by id desc) // skip (page size * (page size-1 )) recordsORDERID DESC2. pagination that meets the condition record (
Some articles also said that injection attacks will have a "third wave" attack trend, which will be even more difficult to detect at that time. Even Microsoft's bosses have come out to clarify that it has nothing to do with Microsoft's technology
Example:Table Structure:Id ParentId1 02 13 2......The table structure is described as follows:The parent node of 1 is 0,The parent node of 2 is 1,The parent node of 3 is 2.......Similarly, the value of a parent node, such as 1,All subnodes under
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.