SQL NOT NULL - Overview, syntax

          

SQL NOT NULL - Overview, syntax


SQL NOT NULL - Introduction and syntax

<<Previous  Next>>

SQL - Dec 03, 2008 at 18:00 PM by Rajmeet Ghai

Explain the SQL NOT NULL statement. Write SQL syntax for the SQL NOT NULL statement along with an example.

SQL NOT NULL: The NOT NULL constraint enforces a column to NOT accept NULL values. This means a column with not null always needs to have a value. This means that you cannot insert a new record, or update a record without adding a value to this field

Example:

CREATE TABLE employee
(
     Emp_id int NOT NULL,
     LastName varchar(255) NOT NULL,  
     FirstName varchar(255),
     Address varchar(255),
     City varchar(255)
)


SQL BETWEEN

SQL BETWEEN: The BETWEEN operator is used in a WHERE clause to select a range of data between two values. The values can be numbers, text, or dates..............

SQL CREATE VIEW

SQL CREATE VIEW: A view is a virtual table. A view contains rows and columns, just like a real table..............

SQL HAVING

HAVING clause is used to specify some condition along with aggregate functions............

SQL MINUS

SQL MINUS returns all rows in the first query that are not returned in the second query..................

Explain the SQL UNION ALL statement. Write SQL syntax for the SQL UNION ALL statement along with an example.

SQL UNION ALL: The UNION ALL operator is used to combine the result-set of two or more SELECT statements Tables of both the select statement ................

<<Previous  Next>>



Write your comment - Share Knowledge and Experience


 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring