Skip to main content

Posts

Showing posts from April, 2015

Anjular Js Examples

Anjular Js Examples : <!DOCTYPE html> <html> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> <body> <!-- <span ng-app=""> <input type="text" ng-model="test"> {{test}} </span> --> <!-- <span ng-app=""> <input type="text" ng-model="koti"> <span ng-bind="koti"></span> </span> --> <!-- <div ng-app="" ng-init="location='bangalore'"> <p>Location is :<span ng-bind="location"></span></p> </div> <div ng-app=""> {{50-50}} </div> --> =========== <!-- <div ng-app="koti"  ng-controller="raogaru"> <p>name :<span><input type="text" ng-model="name" id="check"></span></p> <p>location :<span...

Mysql Store Procedures and cursors and triggers

Mysql Store Procedures and cursors and triggers ---------------start-------------------- to drop procedure ---------------------------------------- mysql> drop procedure myProc;     -> $$ Query OK, 0 rows affected (0.02 sec) ---------------end---------------------- ---------------start-------------------- cursor sample example1 ---------------------------------------- mysql> delimiter $$ mysql> CREATE PROCEDURE myProc() BEGIN     ->  DECLARE l_last_row INT DEFAULT 0;     ->  DECLARE l_dept_id  INT;     ->  DECLARE c_dept CURSOR FOR     -> select id from employees;     -> DECLARE continue handler for NOT FOUND SET l_last_row=1;     -> OPEN c_dept;     -> dept_cursor: LOOP     -> FETCH c_dept INTO l_dept_id;     -> IF (l_last_row=1) THEN     -> LEAVE dept_cursor...

Mongodb Basics

Mongodb Basics : 1)mongo 2)show dbs; 3)use sample_mongo_development; 4)show tables || show collections; > show tables; articles system.indexes 5)See the table records > db.articles.find(); { "_id" : ObjectId("552d065568657523e5000000"), "name" : "rdfgffdg", "content" : "dfgfdgdfgdfg" } { "_id" : ObjectId("552d07b968657523e5010000"), "name" : "xzgfxcgv", "content" : "xcvxvxvcx" } { "_id" : ObjectId("552d094768657523e5020000"), "name" : "fgdfg", "content" : "dfgdfg" } { "_id" : ObjectId("552f56766865751802000000"), "name" : "drdsf", "content" : "dsfsdf" } { "_id" : ObjectId("552f5a1b6865751802010000"), "name" : "dfvxc", "content" : "fdhgdfh" } { "_id" : ObjectId("552f5...

Mysql Basic Commands

 ============Mysql Basic Commands================= 1)create database sample; ----> creating new database 2)use sample 3)show tables;   -----> show the all tables 4)create table student(id integer primary key auto_increment,name char(20),phone_no int(10),address varchar(100),dob date); 5)desc student --> see the all column in table 6)insert into student (name,phone_no,address) values ("koti",66666666666,"bng"), ("swathi",777777777,"karntaka"), ("anushuka",000000,"banagalore"); --->inserting data to table 7)select * from student; ---> see all the records in single table 8)select * from student where name = "koti"; -- > where condition 9)alter table student rename course --- > Rename the table 10)alter table student add column dob date;   --- > Add column in Mysql 11)alter table course change dob dateofbirth date;  ---> Rename the column 12)alter table course modify city char(20); ---> C...