Tags: mean engine Enter procedure Decimal Bitwise Operation Method Screen type conversionDirectory
1. Programming with the Transact-SQL language
1.1. Data Definition Language DDL
1.2. Data manipulation language DML
1.3. Data Control Language DCL
1.4.transact-sql Language Basics
2. Operators
2.1. Arithmeti
Goto. However, from the perspective of program control, using less goto can make the program structure clearer.
4. Basic SQL commands
The database operating language used by PL/SQL is based on SQL. Therefore, familiarity with SQL is the basis for PL/SQL programming. Tab
Alias for SQL1. You cannot use the alias of the column name in the WHERE clause, that is, the select name T from EMP where t>2999; is not allowed2. Benefits of using aliases:Improve the readability of SQLImprove the efficiency of SQL parsing executionGrammar checkSemantic checkShared Pool ChecksBuild the execution treePerform3. Hard parsing and soft parsing of SQL?Execution Order of SQL1. From statement--wh
] table [where condition];Use the WHERE clause to specify deleted recordsDelete from departments where Department_name = ' finance ';If you omit the WHERE clause, all data in the table is deleted:Delete from Copy_emp;Delete data based on another tableDelete FROM Employeeswhere department_id = (select department_idFrom departmentswhere Department_nameLike '%public% ');TRUNCATE statementsRemoves all rows from the table, preserving the empty table and the completed table structure.Data definition L
The SQL language is divided into four categories: Data Query Language DQL, Data manipulation language DML, Data definition language DDL, Data Control Language DCL. 1. Data Query Language DQL Data Query Language DQL The basic structure is a query block consisting of a SELECT clause, a FROM clause, a WHERE clause: Select from WHERE 2. Data manipulation Language Data Manipulation language DML
:= ' CREATE TABLE ' | | P_table_name | | ' (ID number, name VARCHAR2 (+) not null) ';--Create a data table, note that the space is not ignored here, in accordance with the normal write CREATE TABLE statement format and space, otherwise unrecognizedExecute immediate v_sql_statement;--execute dynamic SQLEnd If;V_sql_statement:= ' SELECT COUNT (*) from ' | | p_table_name;--query data table record, note plus spaceExecute immediate v_sql_statement into v_count;--execute dynamic
oracle| Data | database
first, some concepts of relational databases
1, the value of the primary key can not be changed generally
2. Foreign key: A field that points to another table or to the primary key or unique key of this table. The value of a foreign key must be the same as a primary key, or it will be empty.
3. Database-like: tables, views, sequences, indexes, synonyms, programs (processes, functions, SQL and Pl/
1. View the version of the database
SELECT @ @version
Several common SQL Server patched version numbers:
8.00.194 Microsoft SQL Server 2000
8.00.384 Microsoft SQL Server SP1
8.00.532 Microsoft SQL Server SP2
8.00.760 Microsoft SQL Server SP3
8.00.818 Microsoft
1. View the version of the database
SELECT @ @version
2. View the machine operating system parameters of the database
EXEC master.. xp_msver
3. View Database Startup Parameters
sp_configure
4. View Database Startup time
Select CONVERT (varchar, login_time,120) from master. sysprocesses where spid=1
To view the database server name and instance name
print ' Server Name ... ...: ' + CONVERT (varchar (), @ @SERVERNAME) (@, @)
print ' Instance ... ...: ' + CONVERT (varchar) (@ @SERVICENAME)., D., ".
server| Data | database | statement
1. View the version of the databaseSELECT @ @version2. View the machine operating system parameters of the databaseEXEC master.. xp_msver3. View Database Startup Parameterssp_configure4. View Database Startup timeSelect CONVERT (varchar, login_time,120) from master. sysprocesses where spid=1To view the database server name and instance nameprint ' Server Name ... ...: ' + CONVERT (varchar (), @ @SERVERNAME), ".print ' Instance ....: ' + CONVERT (varchar), @ @S
Tags: free ODBC freetds tle project download server using HTTPSSQL SQL statements and stored procedures for SQL Server execution with FreeTDS under Linux Http://www.linuxidc.com/Linux/2012-06/61617.htm FreeTDS related Http://www.knowsky.com/616936.html The shell accepts the value returned by the stored procedure Http://blog.chinaunix.net/uid-22948773-id-3318716.html MyBatis call stored procedure and return
MySQL is the most basic SQL syntax. For more information, see.
The most basic SQL syntax/Statement of MySQL. For more information, see.
DDL-Data Definition Language (Create, Alter, Drop, DECLARE)
DML-data manipulation language (Select, Delete, Update, Insert)
DCL-Data Control Language (GRANT, REVOKE, COMMIT, ROLLBACK)
First, we will briefly introduce the basic
A few questions about SQL (SQL advanced) and SQL advanced
When we get a question, we are not eager to answer the question. It will not be worth the candle, but to analyze the ideas, methods, and objectives, we also need to think about whether there are simple methods or general methods to achieve the same effect. In fact, this kind of inertial thinking was introd
like '% @ str %'Create an encrypted stored procedure or function WITH the with encryption parameter before theYou can use sp_decrypt to decrypt encrypted stored procedures and functions.10. View user and process information in the databaseSp_whoView information about active users and processes in the SQL Server databaseSp_who 'active'View the locks in the SQL Server databaseSp_lockProcess No. 1--50 is used
Often develop ASP but for the meticulous statement, the truth is not very clear, here a simple introduction.
Under normal circumstances
Read the data with Rs.Open sql,conn,1,1
Modifying data: Rs.Open sql,conn,1,3
Delete data: Directly to Conn.execute ("Delete * from new where id=1").
The Rs.Open syntax is as follows: Rs. Open Source,activeconnection,cursortype,locktype
Source is a
Tags: ash text results SQL tuning SRC completion need to end TunA few days ago, a user developed QQ to find me, as follows:The free Dolphin. 16:12:01The island owner, my SQL can not find the results, could you help me see?Orchid Island Main 16:12:10How long is the result?The Free Dolphin 16:12:17How long has not produced the result, has not seen the result.Orchid Island Main 16:12:26Oh, good.Orchid Island M
this development environment, very simple: click Start | Program "|" Microsoft SQL Server "|" SQL Server Management Studio option launches the Managementstudio tool.? Transac-sql Language Introduction1. Data Definition languageData definition Language (DDL) refers to statements that define and manage databases and the various objects in the database, including c
relational database, SQL language simple, learning software introductionsql:structured Query Language structured querying language The database is divided into: hierarchical type, net type, relational type. Relational database: A collection of two-dimensional tables that can be used to store different types of data informationCommonly used databases include: Oracle/mysql/microsoft SQL server/access/db2/post
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.