• Home
  • MAD
    • IOS Series
    • Android Series
    • Flutter Series
    • Xamarin Series
  • Concept Series
    • Software Design
    • Software Arch
    • GIT & Github
    • System Design
    • Cloud
    • Database Integration
    • Push Notification
    • API Integration
    • Cocoa PODS
  • DSA
  • Interview
  • Tips&Tricks
  • YT
  • Home
  • MAD
    • IOS Series
    • Android Series
    • Flutter Series
    • Xamarin Series
  • Concept Series
    • Software Design
    • Software Arch
    • GIT & Github
    • System Design
    • Cloud
    • Database Integration
    • Push Notification
    • API Integration
    • Cocoa PODS
  • DSA
  • Interview
  • Tips&Tricks
  • YT
  • #News
  • #APPS
  • #Events
    • #WWDC
    • #I/O
    • #Ignite
  • #Let’s Talk

MyCodeTips mycodetips-newlogocopy1

  • Home
  • MAD
    • IOS Series
    • Android Series
    • Flutter Series
    • Xamarin Series
  • Concept Series
    • Software Design
    • Software Arch
    • GIT & Github
    • System Design
    • Cloud
    • Database Integration
    • Push Notification
    • API Integration
    • Cocoa PODS
  • DSA
  • Interview
  • Tips&Tricks
  • YT
Database

How to create SQLite mac Terminal?

Sqlite-Db-Screen

SQLite mac Terminal

1. Using spolight(press the cmd+space) search the terminal, Terminal its a default editor avilable in mac. or in the Menu go on Application -> Terminal.

2.First select the location where you want save your database file. i choose desktop. then type the command CD Desktop (semicoln ; not require).

3. type the command “SQlite3 database_name.sqlite” and press enter. for your understanding purpose i create database name as MyCircle.
ex – SQLite3 MyCircle.sql
*note: you can give extension of your database file as .sql,.sqlite,.db

4. after creating the database for using .databases command you can show the list of databases.
ex – .databases;

5. after if u create successful database then required to go for create the table for storing and manage the data.
ex. create table Table_Name(field_name1, type, field_name2 type,fild_n type_n); (After writing query must and should semicolon ; required otherwise execution time you get output like…>)
ex. create table Friends(ID integer primary key autoincrement, Name varchar(60), Age int);
*note :- this Friends table belong to MyCircle database.

6.After without any error creating table you need for feel the some data in that table then go for insert statement.
ex. insert inot table_name values(value1,value2,value_n);
*note :- fill the value as per datatype. if datatype is varchar then require data in single qoute ‘ ‘ where as integer type no required.
ex. insert into Friends values(1,’MyCodeTips’,21);
explanation:- ID is 1, Name type as a varchar then require ‘MyCodeTips’.

Liked it? Take a second to support Ranjan on Patreon!
become a patron button
  • Click to share on Reddit (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • More
  • Click to share on Pocket (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
Written by Ranjan - 12366 Views
Tags | DATABASE, Mac, sqlite, terminal
AUTHOR
Ranjan

Namaste, My name is Ranjan, I am a graduate from NIT Rourkela. This website is basically about of what i learnt from my years of experience as a software engineer on software development specifically on mobile application development, design patterns/architectures, its changing scenarios, security, troubleshooting, tools, tips&tricks and many more.

You Might Also Like

mycodetips-newlogo2

Creating Simple Event with MySQL

October 8, 2013
1386376017 database

Creating a Data File in AS400

January 18, 2014
mycodetips-newlogo2

Work on MAC-OSX without using mouse or Touchpad

October 15, 2013
Next Post
Previous Post

Support us

mycodetips
mycodetips

Follow us @ LinkedIn 2850+

Subscribe for updates

Join 8,213 other subscribers

Latest Posts

  • YT-Featured-solidprinciples
    SOLID Principles of Software Design
  • IOS 16 Features
    Latest features in IOS 16
  • r-language
    How can R language be used for data analysis?
  • wordpress-coding-blog
    Guide To WordPress Coding Standards
  • YT-Featured-Algorithm
    What is Algorithm?
  • Frameworks of IOS
    Frameworks of IOS – Part ( I )
  • NSFileManager or NSPathUtilities
    NSFileManager or NSPathUtilities in Objective-C
  • Passing data between view controllers in Objective-C
    Passing data between view controllers in Objective-C
  • structures-classes-enum
    Structures and Classes in swift !
  • control-system-swift
    Control Flow in Swift
whiteboard

Whiteboard(PRO)

whiteboard

Whiteboard(lite)

alphabets

Kids Alphabet

techlynk

Techlynk

techbyte

Do2Day

techbyte

Techbyte

  • #about
  • #myapps
  • #contact
  • #privacy
  • #Advertise
  • #myQuestions

Android Android Studio API APP Programming Apps blogging CSS DATABASE dsa Features HTML HTML5 installation Interview Questions IOS iPhone javascript Mac objective-c OS Programming quicktips SDK SEO SQL swift Tips & Tricks Tools UI Web Wordpress Xcode

  • SOLID Principles of Software Design
  • Latest features in IOS 16
  • How can R language be used for data analysis?
  • Guide To WordPress Coding Standards
  • What is Algorithm?

©mycodetips.com