Datetime
The data type that represents the date and time of day, from January 1, 1753 to December 31, 9999
smalldatetime
range from January 1, 1900 to June 6, 2079
String type
Type
Describe
Char
A fixed-length or variable-length character data type with a range of 1 to 8,000 bytes
Text
Maximum length is 2^31-1
varchar
A fixed-length or variable-length character dat
Tags: looping creat begin proc Condition CREATE CIRCULAR statement query trigger BASIC Programming: Define variable DECLARE @ variable name data type Assignment SET @ variable name = value SELECT @ variable name = value Value print SELECT @ variable name print @ variable name Map to result set Print to message box Branch statementsIf @a>@bBeginStatement....EndElseBeginEnd Looping statementsNotice the four elements of the loop: initial conditi
Tags: SQL Server--t-sql programming, using the method of solving two positive integers with the greatest common divisor declare @m int, @n intselect @m=12,@n=21declare @t int, @r intprint cast (@m as varchar (5)) + ' and ' +cast (@n as varchar (5)) + ' greatest common divisor: '--if @mT-SQL
Tags: ar sp bs SQL User Har programming nbsp cThe variables in T-SQL are all at the beginning of the @ signStart with an @ sign, called a "user-declared variable"A "global variable", "System Variable", which begins with two @@ 开头 is maintained by the system. Without our maintenance--Define a variable yourselfdeclare @userName nvarchar (50)--Assigning values to va
1 PackageOrg.warnier.zhang.jdbc;2 3 Importjava.sql.Connection;4 ImportJava.sql.DriverManager;5 ImportJava.sql.ResultSet;6 ImportJava.sql.ResultSetMetaData;7 Importjava.sql.SQLException;8 Importjava.sql.Statement;9 Ten Public classSqlservertest { One A /** - * @paramargs - * @throwsclassnotfoundexception the * @throwsSQLException - */ - Public Static voidMain (string[] args)throwsClassNotFoundException, - SQLException { + //load the driver; (The virtual mac
Oracle Database Programming: Change Data and management items in PL/SQL change data and manage items in PL/SQL: returning clause of DML statements: to obtain the information after the insert, update, and delete statements are executed, you can add the returning clause after the statements instead of the information before execution. If DML changes multiple rows o
SQL programming-advanced queries and precautions
1. What is a subquery?
When one query is a condition of another query, it is called a subquery. For subquery, you can use several simple commands to Construct Powerful composite commands. Subqueries are most commonly used in the WHERE clause of SELECT-SQL commands. A subquery is a SELECT statement nested in a SELE
of the main SELECT statement.The ORDER by clause can be used and is required for top-n analysis. 3. There are two comparison criteria that can be used in a subquery: the single-line operator and the multiple-line operators. Types of Single-row subquery: Query that returns only one row from the inner SELECT statementMulti-row subquery: Query that returns multiple rows from the inner SELECT statementA single-line subquery is a query that returns a row from within the query. A single-line operator
of the main SELECT statement.The ORDER by clause can be used and is required for top-n analysis. 3. There are two comparison criteria that can be used in a subquery: the single-line operator and the multiple-line operators. Types of Single-row subquery: Query that returns only one row from the inner SELECT statementMulti-row subquery: Query that returns multiple rows from the inner SELECT statementA single-line subquery is a query that returns a row from within the query. A single-line operator
For PL/SQL programming, this part of the Oracle database storage process is accurate, alas, it was difficult to learn when I was learning. In fact, it is very simple, is to learn a few times, learn not to learn again. Slowly, you can take care of it.The experience has been taught. Here's a look at the Plsql variables related knowledge:Let's take a look at the following code:DeclareV_num number (20);BeginDbm
VS2013 MFC ODBC connection SQL Server database programming (iii) Reprint Please specify: http://blog.csdn.net/my_acm/article/category/2616577Following the previous article on the database links and some instructions, this article will be implemented in the database and other operations such as adding and deleting.As shown is a simple small program that is finalized.First, add the Nm_click Responder for the
The plsql block that only contains the execution part setserveroutputon -- open the output option begindbms_output.put_line (
Only pl/SQL block including execution part set serveroutput on -- open the output option begin dbms_output.put_line (
Pl/SQL block that only contains the execution part
Set serveroutput on -- enable output options
Begin
Dbms_output.put_line ('hello ');
End;
Instructions:
table1;Execute SQL ScriptSource My.sql--my.sql-------------------Insert INTO table1 (name, sex, Age, Class) VALUES (' Xiao Wang ', ' Female ', ' C + + class '); insert into table1 (name, sex, Age, Class) VALUE S (' Xiao Li ', ' Male ', ' C + + class '), insert into table1 (name, sex, Age, Class) VALUES (' Xiao Zhang ', ' Male ', ', ' Java class '); insert into table1 (n Ame, sex, age, Class) VALUES (' pock ', ' female ', ' C + + class '), INSERT into
number of elements in the variable-length array.
Alter type varray_phonemodify limit 2 cascade -- an error is reported. The varray limit can only be increased.
Alter type varray_phonemodify limit 5 cascade
Insert into person3 values (3, 'yuanyuan ', 'weixiang', varray_phone ('000000', '000000', '000000', '000000', '000000 '));
4. cursor
? Introduction: In PL/SQL programming, you sometimes need to perform r
Oracle Database Programming: PL/SQL program control structure: condition control: if statement: if condition 1 then if condition 1 is true execute the statement here ...... Elsif condition 2 then if condition 2 is true, execute the statement here ...... If both conditions 1 and 2 of else are not true, execute the statement here ...... End if; case statement: case selector when condition 1 then if condition
Pl/SQL block that only contains the execution part
Set serveroutput on -- enable output options
Begin
Dbms_output.put_line ('hello ');
End;
Instructions:
Dbms_output is a package provided by Oracle locks (similar to java). This package contains some processes. put_line is a process in the dbms_output package.
The set serveroutput on Clause indicates that the output result is enabled. If this clause is not used, the result will not be output.
S
Programming | data | Database are you satisfied with the database you designed? Are you sure you don't want to deal with it? For example, create a new database table, such as creating or modifying a field ... Of course, these are all part of the design database.
So, your normal operation is not to download the database to the local computer, and then open it to modify, and then upload it up? Ten to one,-_-!.
Now, you can contact with the information
Server is connected.===================================================Details:Da. Fill (ds, "xxx")Datagridview1.datasource = ds. Tables ("xxx")The two sentences of xxx represent the table name, this table name and the original database table name can be different.Since this is the table in the dataset result set, it is not a user-defined table name in the original database, so you can name it arbitrarily, but the two should be consistent.In general, they do not define themselves, and if there
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.