Skip to main content

Posts

Showing posts from April, 2016

Node Js Tutorial

Node.js Tutorial Node.js is a very powerful JavaScript-based framework/platform built on Google Chrome's JavaScript V8 Engine. It is used to develop I/O intensive web applications like video streaming sites, single-page applications, and other web applications. Node.js is open source, completely free, and used by thousands of developers around the world. Audience This tutorial is designed for software programmers who want to learn the basics of Node.js and its architectural concepts. This tutorial will give you enough understanding on all the necessary components of Node.js with suitable examples. Prerequisites Before proceeding with this tutorial, you should have a basic understanding of JavaScript. As we are going to develop web-based applications using Node.js, it will be good if you have some understanding of other web technologies such as HTML, CSS, AJAX, etc. Execute Node.js Online For most of the examples given in this tutorial, you will fin...

MySQL query to select events between start/end date

CREATE TABLE IF NOT EXISTS `events` (   `ID` int(11) NOT NULL AUTO_INCREMENT,   `START` varchar(10) DEFAULT NULL,   PRIMARY KEY (`ID`) ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; -- -- Dumping data for table `events` -- INSERT INTO `events` (`ID`, `START`) VALUES (1, '2013-06-14'), (2, '2013-06-15'), (3, '2013-06-22'), (4, '2013-07-01'), (5, '2013-07-30'); Query: SELECT ID FROM events WHERE start BETWEEN '2013-06-14' AND '2013-06-22'

Difference Between Primary Key and Unique Key In Sql Server

Both  PRIMARY KEY  and  UNIQUE KEY  enforces the Uniqueness of the values  (i.e. avoids duplicate values) on the column[s] on which it is defined.  Also these key’s can Uniquely identify each row in database table. Below table lists out the major  difference between PRIMARY KEY and UNIQUE KEY : PRIMARY KEY UNIQUE KEY NULL It doesn’t allow Null values. Because of this we refer PRIMARY KEY = UNIQUE KEY + Not Null CONSTRAINT Allows Null value. But only one Null value. INDEX By default it adds a clustered index By default it adds a UNIQUE non-clustered index LIMIT A table can have only one PRIMARY KEY Column[s] A table can have more than one UNIQUE Key Column[s] CREATE SYNTAX Below is the sample example for defining a single column as a PRIMARY KEY column while creating a table: CREATE TABLE  dbo.Customer ( Id  IN...