Sql-statements - sql-statements.com - SQL Tutorial - Learn SQL Online
General Information:
Latest News:
SQL FOREIGN KEY Constraint 21 Jan 2013 | 12:30 am
The FOREIGN KEY constraint is used to point to primary key of another database table. Foreigh key ensures that the data exists when we have reference to it. For example, we have a table of Employee (E...
SQL UNIQUE Constraint 15 Dec 2012 | 09:23 pm
The UNIQUE constraint is used to uniquely identify each row in a database table. It is some similar to Primary key, but has some difference: Primary Key is automatically Unique Constraint One table sh...
SQL PRIMARY KEY Constraint 27 Feb 2012 | 10:29 am
The PRIMARY KEY constraint is used to identify each row in a database table. It has some features: It must be unique value One table should have ONE primary key. One table should ONLY have one prim...
SQL DEFAULT Constraint 28 Dec 2011 | 05:31 pm
The SQL DEFAULT Constraint is used to set a default value to a column when we insert a new row to a table without providing a value for the column. We can use the DEFAULT keyword to specify a default...
SQL NOT NULL Constraint 21 Dec 2011 | 04:26 pm
By default, a column can hold NULL value. The SQL NOT NULL Constraint is used to force a column cannot accept a NULL value, and must hold a value. The above script will create a table named “Users”, ...
SQL Create Table 18 Dec 2011 | 06:38 am
SQL table is a place where the SQL database stores the data. It has columns and rows. We can use CREATE TABLE statement to create a table in a database. SQL CREATE TABLE Syntax data_type is required...
ORACLE TO_CHAR 14 Dec 2011 | 04:47 pm
Oracle To_char() is an SQL function which will convert a number or date to string. ORACLE TO_CHAR Function Syntax The Oracle to_date() function’s syntax could be one of the following: value: number...
SQL REVERSE 11 Dec 2011 | 04:26 pm
SQL REVERSE function is used to return reverse of a string. It’s supported by MS SQL Server, MySQL. Oracle supports it too, but maybe not in the documents. SQL REVERSE function Syntax SQL REVERSE fu...
The Difference Among char, nchar, varchar, nvarchar in MS SQL Server 7 Dec 2011 | 04:43 pm
In MS SQL Server, there are some data types of string, like char, nchar, varchar, nvarchar. What’s the difference among them? Char is fixed length. Even if you don’t use up all the space, it will sti...
SQL LEFT Function 5 Dec 2011 | 01:03 pm
SQL LEFT() function is used to get left part of a string with the length of specified number. It is supported by MySQL, MS SQL Server, Access, but not by Oracle. SQL LEFT Function Syntax Note: 1, I...