1.SQLServer Configuration Manager----SQL Server Network configuration----MSSQLSERVER Protocols---TCP/IP (enabled)---IP addressesClear the known IP and change the default port under Ipall:2. cmd command, run Cliconfg.exe, General---"In order to enable protocol---" TCP/IP---properties----"port changed to default port3, through the Telnet command, detect whether the port is open4, connection database, database format IP address, port number \ Instance Na
First, write it in front.A lot of days did not record SQL learning notes, to persist, firmly believe that every point of progress is to accumulate strength. See a picture today and share it.Through this picture, I see each person standing in their own perspective, feeling is not the same, like learning knowledge, always feel that their understanding is the most u
drop three grammars.
Database Manipulation Language (DML) is responsible for the instruction set for running data access work on database objects, with INSERT UPDATE DELETE three directives as the core
The Database Control Language (DCL) is responsible for authorization and role control of database objects, consisting of two instructions from GRANT and REVOKE.
source of data collation Wikipedia: Https://zh.wikipedia.org/wiki/SQL
: Programming Ruby.For this implementation, you must pay particular attention to the deletion of the data. Because there is a reference to the books in the topics, the same books has a reference to the topics, how does the deletion work? To delete the data in books, the first thought is to delete the data for each key "book:id:*", but before you do this, you need to walk through the collection of all key "Topic:id:books" in topics and remove the ID of the book you want to delete from it. Of cour
"SQL must Know" learning notes (i)Below is a list of my newly learned knowledge.This is the entire database record.1.order byStatement: SELECT * from Scores order by name, score descExecution Result:①order by when performing the sort function, the sort field is first in the order of ABCD, and the Chinese word is the first letter of the pinyin, and the default is the positive order.② example first by the N
Tags: Sql server2012 database ZBLOG BlogLearning notes: Today I am learning about the ZBLOGASP2.2 version of the program to carry the database, because in recent years have been blogging, so for the system of the earlier version is still more familiar with, but for the new version and the new database is not much understanding. Especially with the Ms-sql database
learn network security knowledge, to master network security practices. Career development in the direction of network security, to solve the problem of the shortage of information security personnel in China. In addition, even if not transformation, to do a good job in operation and maintenance, learning safety knowledge to obtain safety certification is also essential. Reason three: grounding gas, international stylish, easy to test, moderate cost!
Label:1.DISTINCT DISTINCT This keyword is used to filter out redundant duplicate records to keep only one, but it is often used only to return the number of distinct records, rather than using it to return all values that are not re-recorded. The reason is that distinct only with double-loop query to solve, and so for a very large number of stations, will undoubtedly directly affect the efficiency. The 2.ORDER by order BY statement is used to sort the result set based on the specified column. T
Label:1.Top Query Statements SELECT TOP n Used to get the number of data bars returned by the rule. SELECT TOP N PERCENT 2.LIKE operator Query the records in the database by using a wildcard character. _ Denotes matching with any single character % indicates a match to a string containing one or more characters [] matches any single character in a specific range (for example, [a-f]) or a specific set (for example, [abcdef]). [^] or [!] Matches any single character other than a specific range (
table
As a table example select E.emono,e.ename from (SELECT * from where deptno=30) E
gave the table an alias E
As a condition there are several situations
Single-column: You can use =,>,
A multiline column (collection) can be
Single-row multi-column (object) is a row, like an object, what property has
Multiline multiple columns: Multiple rows and columns are always used as tables from behind
Single-row Example: SELECT * from emp where sal > (select
),
-)+'1')
--3. The first or last day of the month in which the specified date is located
--A. First day of the monthSelectconvert (datetime,CONVERT(Char(8),@dt, -)+'1')
--B. The last day of the monthSelectdateadd ( Day,-1,CONVERT(Char(8),DATEADD(Month,1,@dt), -)+'1')
--C. Last day of the month (easy-to-use error method)Selectdateadd (Month,1,DATEADD( Day,- Day(@dt),@dt))
--4. Any day of the week on which the specified date is locatedSelectdateadd ( Day,@number-DATEPART(Weekday,@d
unique (name)4. Invalidating a constraintThe Emp3 table has a unique constraint that invalidates it, but does not deletesql> ALTER TABLE Emp3 2 disable constraint emp3_email_uk;5. Effective, if the data of the column should conform to the constraints of the constrained constraint, such as the unique constraint, in order to be effective, it is necessary to ensure that the data of this column cannot be duplicated.sql> ALTER TABLE Emp3 2 enable constraint Emp3_email_uk; 6. Query constraintsSEL
results of multiple SELECT statements together, in which case it is necessary to combine the results of several SELECT statements, for example, to query all the employee information of company A and Company B, and then merge the results of the two queries together. The Union and UNION ALL keywords are used for the merge operation. Format: SELECT statement 1 UNION | UNION All SELECT statement 2 UNION | UNION All ............ Example: Query the value of the d_id field from the Department table a
OUTER JOIN table_2 On table_1.name = Table_2.name WHERE Table_2.name is NULL B A and B are not common SELECT * from Table_1 Full OUTER JOIN table_2 On table_1.name = Table_2.name WHERE table_1.name is null OR table_2.name is null 6 UNION Merges the result set of two or more SELECT statements. The SELECT statement inside the UNION must have the same number of columns. The column must also have a similar data type. Also, the order of the columns in each SELECT statement must be the same. SELE
the database management system through additional functions in the system.Separation of databasesSelect Database Right-click Task to isolate and determineIf the database is in a ready state, it can be detached.Database AttachRight-click on the database and select AttachIn the Additional Database window that opens, click AddSelect Database file (. mdf) Double-click to addDatabase information attached to the system is normalized according to the selected database file, and the system can automati
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.