MySQL Study Notes _ 8_ SQL BASIC Language review, Study Notes _ 8_ SQL SQL language basic review
I. Overview
SQL statement comments
1) All contents starting with "#" until the end of the line are comments
2) All content starting with "--" (-- and then a space) until the end
Database Review CH4 SQLSQL (structured query Language, Structured Query language) is a common relational database system operation language, the following from several aspects to review the SQL Foundation4.1 DDLSQL statements can be divided into three categories depending on the nature of their operations:
DDL (Data Definition Language)
DCL (Data Con
Tags: io os on admin SQL window C Windows method1, IP address is not configured correctly:Open the SQL Server Configuration Manager under Microsoft SQL Server 2005 Config tool, select the MSSQLSERVER protocol, and then double-click TCP/IP in the right window to check the configuration in the pop-up window.2, may be caused by the VIA protocol enabled. Here's how t
Summary and review of SQLServer. If you are studying sqlserver, refer
SQL Server summary and review. If you are studying SQL Server, refer
1. ranking function and PARTITIONThe Code is as follows:
-- All data
SELECT * FROM dbo. student AS a inner join dbo. ScoreTB AS B ON a. Id = B. stuid
WHERE scorename = 'China'
--
SQL Server summary and Review (2) for more information, see.
SQL Server summary and Review (2) If you want to learn, refer to it.
1. ranking function and PARTITION
The Code is as follows:
-- All dataSELECT * FROM dbo. student AS a inner join dbo. ScoreTB AS B ON a. Id = B. stuidWHERE scoren
SQL Server advanced content table expressions and review 1. table expression (1) uses a table as a source or a query result set as a source to process the source and obtain a new data source for query. (2) (3) to derive a table, use the result set obtained by the table query as a new data source. Note the following points: 1) the derived table must
SQL Server adv
statementsBegin Try...end TryBegin Catch...end Catch -- 1. Variables
Declare @name nvarchar (ten) -- Statement
Set @name = ' Wuhan University ' -- Assign Value
Print @name -- Output View Code --SELECT statement
Declare @id int
Set @id=Ten
if @id>5
begin
--when the condition is met, execute the following code
Print 'OK'
End
Else
begin
--when the condition is not met, execute the following code
Print 'No'
End
--Loops
Declare @id int
Set @id=1
while @idTen
begin
Print @id
Recommended Tools: If the machine configuration is low, you can install gsql this tool to obtain the SQL execution environment (as a manual view built-in data type functions and stored procedures, etc.)--Before the database things touch not much, although the basic syntax is to understand, but not very familiar with--recent projects have been tossing stored procedures (some data logic is implemented through stored procedures on the database side),--A
As a database administrator for billing applications (DBA), the company's chief information Officer (CIO) often invites me to meet with Sarbanes-oxley reviewers to discuss the security and consolidation of corporate data. Simply put, he wants us to answer a number of questions through the right documents: who has access to our data, how to authorize access, and how we monitor access to prevent someone from invading, logging into data, or doing something they shouldn't.
My CIO and I have learned
I have been learning about SQL Server recently. I took a test yesterday. It's really not easy. In particular, some complex queries. It makes me dizzy. However, it is also because your knowledge is not solid enough. So today I reviewed the addition, deletion, modification, and query of the T-SQL statement. Many of them are indeed forgotten. Write the result. Don't forget it in the future.
--
Parameters property, one parameter with the Add methodcmd. Parameters.Add (NewSqlParameter ("@name", TextBox1.Text)); Conn. Open (); inti =Convert.ToInt32 (cmd. ExecuteScalar ()); MessageBox.Show (i.ToString ()); } } }}View CodeParameterized statement execution procedure:(1) Open Database Tools ->profier tool (Database Analysis monitoring tool)(2) Execution code: Enter a ' or 1=1 or 1 = 'After clicking the button(3) Then look at the profiler.EX
and degree column.Select Sno,cno,degree from score where degree= (select MAX (degree) from score) Select top 1* from score order BY degree DESC --The 43rd query and "Li June" with the sex of all students sname.Select Sname from student where ssex= (select Ssex from student where Sname= ' Li June ') and Sname not in (' Li June ') --The 44th query and "Li June" with the same sex and classmates sname.Select Sname from student where ssex= (select Ssex from student where Sname= ' Li June ') and Snam
Tags: ram title res src mysql long locale. exe JDB1 using JDBC for bulk execution SQL in the actual project development, sometimes you need to send a batch of SQL statement execution to the database, you should avoid sending execution to the database, but should adopt the batch processing mechanism of JDBC, in order to improve the execution efficiency. Package dbex.mysql;
Import java.io.IOException;
Import
comma between the column names. The sort method can be DESC and ASC (Ascending), ASC by defaultUNIQUE: The index can take either a clustered index structure or a nonclustered index structure, and the SQL Server system defaults to a nonclustered index structure if the index structure is not specified.Create Unique Index on desc);1.42 Delete Index Syntax:Drop INDEX Drop Index on EMP;1.43 Display index Information:Show index from Tbname;Former part re
Tags: database pl-sqlDatabase Review CH10 PL/SQL 10.1 PL/SQL IntroductionPL /SQL is the process of Oracle's expansion of the procedure for the implementation of a program of SQL-related procedures, and can be stored procedures and functions to allow a section of
Below are some simple summary and review of the SQL script. Most of them refer to Boyou, And I have rewritten it myself.
-- Create a database use ainfolianggoif exists (select * From sys. databases where name = 'ainfoliang ') begindrop database ainfoliang -- print '1' endgocreate database ainfoliangon (name = 'ainfoliang', filename = 'C: \ ainfoliang. MDF ', size = 5, -- the initial size of the database ma
MySQL study note _ 8_ SQL BASIC Language Review SQL language basic review
I. Overview
SQL statement comments
1) All contents starting with "#" until the end of the line are comments
2) All content starting with "--" (-- and then a space) until the end of the line is annotated.
3) All content ending with "/*" and endin
Tags: ar sp strong on BS new as SQL userA stored procedure is a collection of compiled T-SQL statements that can be called at any time, fast and error-prone.Parameters can be passed, common parameters and output parameters (outputs)Example 1Create proc Newpro@testVarA int,@testVatB int,@testSum int OutputAsBeginset @[email protected][email protected]EndCall the stored procedure NewproDECLARE @testA intExecu
DBA SQL ReviewConsiderations for Schema ReviewConsiderations for SQL ReviewOptimization techniques for on-line schema analysisDBA Review Work Contenttable field, index design optimizationfield type (to determine a field for a business, fault, etc type)Annotation Standard DegreePartitioned table constraintsSQL Authoring SpecificationDML Authoring SpecificationChil
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.