Wednesday, January 4, 2017

Essential commands for working with SQLite 3

1. Create Database

  > sqllite3 test.db



2. Create Table

sqlite> create table employees (id interger primary key,name text);


3. Inserting into Table

sqlite> insert into employees values(1, 'Sujata Regoti');



4. Representing in table format

 To display each record in different row and align column wise, set mode to column
sqlite> .mode column 
To display headers i.e column names set headers on
sqlite> .headers on
Now display Table using SQL Select command
sqlite> select * from employees;



5. As name field require more space set using width and specify width for each column

sqlite> .width 15 20
Now Display
sqlite>select * from employees;


6. Exit and Reopen

sqlite> .exit
> sqlite3 test.db


7. To see created tables

sqlite> .tables


Here I have 2 stables employees and student

8. To display each information on its own line set mode to line

sqlite> .mode line
Now display table
sqlite>select * from employees;


9. To see commands used for tables use schema

sqlite> .schema
Or for particular table then specify table name
sqlite> .schema employees



10. To see current settings

sqlite> .show


11. To set nullvalue to "NULL" instead of blank "" as shown in settings

sqlite> .nullvalue 'NULL'


12. To output database on screen use dump

sqlite> dump


13. To save about dump into file then use .output and specify destination

sqlite> .output  D:\study\Employees
sqlite> .dump
sqlite> .output stdout



14. Delete, Drop table

To delete records
sqlite> delete from employees;
To Drop Table
sqlite> drop table employees;



15. To read database which is created previously

Connect to new database



Read from sql file


16. To select table with insert commands

sqlite> .mode insert
sqlite> select * from employees;


17. Working with Different modes: 

> .mode html


>.mode list


>.mode tabs


>.mode tcl



> mode .csv


18. Extract information into CSV.

Use above command to set csv mode.Then
sqlite> .mode csv
sqlite> .output E:/study/Employees.csv
sqlite> select * from employees;
sqlite> .output stdout










                                                 







SQLite Very Simple way to install on Windows

1.Go to https://sqlite.org/download.html



2. Scroll down until you get Precompiled Binaries for Windows. 


3. Click on link to Download where you see command-line shell 
4. Unzip downloaded zip file.
5. Cut Paste .exe file(s) into C:/Windows/System32
6. Open cmd and type sqlite3


Thats It.. :)



Friday, December 9, 2016

Problem: Unable to access 'New Volume' Solved

Unable to access 'New Volume'



Solution :
As shown in Fig. Problem in Mounting "/dev/sda3"

1. Open Terminal Ctrl+Alt+T
2. Type following command

> sudo ntfsfix /dev/sda*
e.g. Here
> sudo ntfsfix /dev/sda3



3. Again Try to Access


Friday, December 2, 2016

Problem & Solution: Can't install jdk 8 on Ubuntu using PPA

Hello Friends.. :)

Problem: initially I tried to install java9 using PPA. Everything was going well but due to some network problem installation failed. Then tried java 8 again failed. Just tried java 7..worked Ye!!
But again wanted to install Android Studio.. Downloaded and tried to install but got error that it require java >=8

OO.. now tried again PPA command but couldn't worked



Solution: Tried installing java 8 manually.

Ref. : https://itsfoss.com/install-java-ubuntu-1404/



Thursday, December 1, 2016

Sunday, November 27, 2016

MALICIOUS SOFTWARE


Definition : Any software that brings harm to a computer system.

Various Malware's:

1.Spyware :                                          
Spyware is any technology that aids in
gathering information about a person or
organization without their knowledge.


2. Logic Bomb :

code embedded in legitimate program activated when specified conditions met

3. Trojan Horse :
program with hidden side-effects which is usually superficially attractive

4.Zombie :
program which secretly takes over another networked computer

5. Virus :
a piece of self-replicating code attached
to some other code and propagate itself
by carrying codes   

6. Worms :
A standalone malware computer program that replicates itself in order to spread to other computers