The previous database installed in the virtual machine, today on the machine installed a SQL2008, remote connection to the virtual machine on the SQL Server, after the drop database test to delete the previous tests failed, prompting "cannot delete
Lock hint DescriptionThe HOLDLOCK retains the shared lock until the transaction completes, instead of releasing the lock as soon as the corresponding table, row, or data page is no longer needed. HOLDLOCK is equivalent to SERIALIZABLE.NOLOCKDo not
SQL Server 2008 opens the remote Access database1. Enter the database Manager in Windows Authentication mode.Step Two: Right-click the SA and select Properties:In the General tab, re-fill in the Password and confirm the password (changed to a good
Use CRM--Current database creation roleexec sp_addrole ' Rapp '--Assign View permissions GRANT SELECT on veiw to [role]--Specify the View listGRANT SELECT on v_city to RappGRANT SELECT on V_LP to RappGRANT SELECT on v_qy to RappGo--Add only users
--A stored procedure that generates INSERT statements based on data in a tableCreate Proc Proc_insert (@tablename varchar (256))As--table nameBeginSET NOCOUNT ONDeclare @sqlstr varchar (4000),@sqlstr1 varchar (4000),@sqlstr2 varchar (4000)Select
1, sysobjectsThe System Object table. Objects that hold the current database, such as constraints, default values, logs, rules, stored procedures, and so onsysobjects important field Explanation:SysObjects (Name sysname,--object namesID int,--object
In our daily development process, when designing a database, we often encounter problems with selecting data types, choosing what type of data is most appropriate, and then choosing the corresponding CLR type when we create the corresponding entity
(i) Add a file Can be executed online, without affecting the database usage. 650) this.width=650; "title=" border-top:0px "style="; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; border-left:0px;
1. Select filename from master. Sysfiles2. Master. Xp_instance_regread n ' HKEY_LOCAL_MACHINE ', n ' software\microsoft\mssqlserver\setup ', n ' SQLPath '--Get the various directories in SQLDECLARE @path varchar (8000)--Get the data file path of the
Computer room toll System reconstruction version of the landing knocked for several days, finally the landing form knocked out, code debugging almost, the problem is in the database. SQL Server in configuration management. SQL Server The service
This article will discuss with you some questions about finding a SQL error.Now the system is basically need to use the database, since the use of the database we will write SQL script, the common practice is now Microsoft SQL Server Management
Because Microsoft modified the SQL Server billing policy (before the CPU charge, now is the CPU core charge), causing the company to spend more than $1 million a year, the boss Aniu think this is not worth, decided to turn to open source free MySQL,
Only the first and first of the duplicate data are retained.
-- CREATE test TABLE [dbo]. [testtab] ([id] [nchar] (10) NULL, [name] [nchar] (10) NULL ); -- insert test data into the test table: insert into testtab values ('1', '1'); insert into
SQL Server paging query common stored procedures (only for paging query), SQL stored procedures
It has been used since the project was started. SORRY, the creator of this stored procedure, wrote this SQL code very well. On this basis, I adjusted the
SQL statement UNION intersection JOIN (inner JOIN, Outer JOIN) and so on, unionjoin1. a. union select column1, column2 FROM table1 union select column1, column2 FROM table2b. intersection join select * FROM table1 AS a JOIN table2 B ON. name = B.
In Linux, use BIEE to connect to the SQLServer business data source, bieesqlserver
1. Client
First, configure the odbc data source on the client. You can directly enter odbcad32 in the running state to open the configuration interface-System
1. Incorrect delete operation:
-- The temporary table deletion operation is incorrect because the database is different.
If exists (SELECT * FROM sysobjects WHERE object_id = OBJECT_ID (n' [dbo]. [# tempTable] ') AND type in (n'u '))
Begin
Drop
Use SQL statements to create and delete constraints.
Use an SQL statement to create or delete a Primary Key constraint of the constraint type (Primary Key constraint) --: The Primary Key column data must be unique and cannot be blank. Unique
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.