hi everyone welcome to this lecture in this lecture we will see how to create a table the sqlite create table statement is used to create a new table in in a given database so we will see an example to create a table with few rows are few parameters that is I will create a table with the name student that is create table followed by the name of the table that is student and in between okay I open the parentheses and I’m using the parameter slide ID which is of type integer followed by and I’m making this ID as my primary key so if we can give primary key and followed by not null means this ID is not null we are going to give some value and next name to the data type text followed by North node it really should not be null and gender it should be text for why not know and followed by age it should be integer it can be null or we can javac we can make it not known and then Vic and closing the parentheses and you can enter the statements by using semicolon so if you see if we created the table and we can check whether our table is created or not by using the command dot make sure that these are lowercase letter dot tables so you can see a table name student so let’s create another table so the table with the table will be something like create table food followed by name of the food in the data type data type would be text and I want to make this as my primary key I should not be and also I’ll use the parameter type itself data type text and it can be null and also twice which is a type integer and it should not be num so I’m closing it parenthesis and semicolon so if you see again dot tables so we have two tables which we created just now and if you want to see the schema are the different elements available in these tables you can use command dot schema and followed by the table name in our case the tape the table name is store data so this is our schema of the tape table student in the next lecture we will see how to delete a table

Tags:






Youtube
Facebook
Google Plus
Twitter
TutorialDrive


Apache Zookeeper Tutorial

Apache Kafka Tutorial

Apache Kafka Security

Elasticserarch n Kibana

Java 8 Tutorial

Log4J Tutorial

Apache Storm Tutorial

SQLite Tutorial

Apache Ant Tutorial

Related Posts

blog

Apache Kafka Commands Cheat sheet

Spread the loveKafka Topics List existing topics bin/kafka-topics.sh –zookeeper localhost:2181 –list Purge a topic bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –config retention.ms=1000 … wait a minute … bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –delete-config retention.ms
Read more…

blog

What is Apache Maven | Apache Maven complete tutorial from scratch pdf

Spread the love In this post you will learn the complete tutorial of Apache Maven build tool What is Maven ? Apache Maven is a software project management and comprehension tool. Based on the concept
Read more…

blog

Practical Guide for Web Development in 2018

Spread the loveWelcome to my practical guide  for web development in 2018 in terms of  technology and career. Before we start I just want to  mention a few things, you don’t need to learn  everything that
Read more…