BelowCodeIf the test passes in MySQL, MSSQL should be able to run without testing.
Copy codeThe Code is as follows: # create a table as follows:
Create temporary table TMP (A int, B INT, C INT );
Insert into TMP values (10,100, 1), (, 2), (, 2 );
Let's sum up and answer these two common questions that most netizens are concerned about.
Differences between in and exist
From the perspective of SQL programming, in is intuitive, and exists is not intuitive. There is one more select,In can be
1. Intersect is the intersection of multiple query results;
2. query the SQL statements recorded in the table within two basic periods;
Select * From shengjibiao t where T. createtime between to_date ('2017-7-26 ', 'yyyy-mm-dd') and to_date ('2017-7-
Software environment:
1. Operating System: Windows 2000 Server
2. Data Base: Oracle 8i R2 (8.1.7) for NT Enterprise Edition
3. installation path: C: Oracle
Implementation Method:
1,
D:> set nls_lang = american_america.usacii7
Or
D:> set nls_lang =
The idea of Oracle paging stored procedures is the same as that of SQL Server, but I have made some changes here because of the differences in Oracle syntax and rules, the Oracle paging Stored Procedure looks a little different. Smile!
Cursor
OpennessSQL ServerIt can only run on windows without any openness. The stability of the operating system is very important to the database. The Windows9x series products focus on desktop applications, and the NT Server is only suitable for small and
Web_THBC indicates the presentation layer, that is, the page (. aspx)
BLL_THBC is the business logic layer
DAL_THBC is the database interaction layer (Execute SQL statements to the database)
Model_THBC is an entity class.
DbHelper is the
1. after you forget your username and password, the system prompts invalid username and password after you try several Oracle Default usernames and passwords (The table contains the default username and password,
UsernamePasswordDescriptionSee Also
Oracle client NLS_LANG settings
OracleWindowsMicrosoftUnixBash1. Composition of the NLS_LANG ParameterThe NLS_LANG parameter consists of the following parts:NLS_LANG = _.
The meanings of NLS_LANG are as follows:LANGUAGE:-Oracle message
1. What is an execution plan)
Execution Plan: the execution process or access path of a query statement in ORACLE.
Ii. How to view the execution plan
1: Press F5 under PL/SQL to view the execution plan. Third-party tools such as toad.
Many people
I. oracleOracle servers include Oracle instace and Oracle database
An instance consists of a memory structure and a background process.
Memory structure includes shared pool and SGA (System Global Area ).
SGA includes Database buffer cache and Redo
1. control user access1. Create and modify user Creating UsersCreate/alter user new_user identified by password;Example: create user user_1 indentified by pwd_1Alter user user_1 identified by pwd_22. grant permissions to usersGrant privilege [,
1. create and manage tables1. Create Table syntax
Create table Name (column datatype [default expr] [, column...])
Default Constraints
2. Create a table using subqueryCreate table NameAsSelect * from u table
Ii. modify a table1. Add a new
1. multiline Functions, also known as Group Functions and Aggregate Functions
1. Types of Group FunctionsAvg, count, max, min, stddev, sum, varianceAvg averageSelect avg (nvl (column 1, 0) from table 1Count calculates the number of rowsAggregate
Principle 1: Pay attention to the connection sequence in the WHERE clause:ORACLE uses the bottom-up sequence to parse the WHERE clause. According to this principle, the join between tables must be written before other WHERE conditions. The
Oracle cursors include display cursors and implicit cursors.
Explicit Cursor: The Cursor defined in the PL/SQL program for query is called a display Cursor.
Implicit Cursor: A Cursor automatically allocated by the Oracle system when UPDATE/DELETE
There are a lot of content about oracle optimization and the concept is complex, but you can summarize an outline as the direction to be considered, and then gradually refine it. The design, development, and adjustment of oracle optimization should
Inner join ).
External Connection:
Full join, left join, and right join ).
Cross join ).
The outer join and the inner join are different. The query results returned by the outer join include not only the rows that meet the conditions, but also the
View the table space name and size
Copy codeThe Code is as follows: SQL> select t. tablespace_name, round (sum (bytes/(1024*1024), 0) ts_size
From dba_tablespaces t, dba_data_files d where t. tablespace_name = d. tablespace_name group by t.
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service