Postgresql tutorial 001:create database,schema,Insert,delete,drop,truncate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone I am de peche today I would like to show you how to create a table on PostgreSQL and I will also show you how to insert data and delete data and finally we drop the table so let us start with logging into the Postgres so I have logged it into the post post grace right now let me see how to create a database first let's name it my dv3 database has been created as you can see my DV 3 database has been created over here and press Q to quit let me now connect to the database I'm now connected to my db3 let me now create a schema inside my DB three I'll name it my dv3 schema schema has been created let's check let's kena and let us create a table first in this scheme one let us add a free called ID make it integer and let's make a field one password with character 10 table has been created now let's check the table in the system catalog table as you can see there are lots of tables showing up but we are only interested with Table one so we need to filter it a little bit not equal as you can see we have a table one created under my dv3 schema table or expose crest which is it is already okay now let's insert some data into it insert successful let me insert another record and insert is successful again opinion select record as you can see that there are two rows inserted then let me try to delete all the data from this we will use truncate and delete these are the two commands that we can use truncate will immediately clear the disk delete will not clear the disk immediately we will have to use vacuum after that so first we will use trunk table has been truncated as we can see that there is no record right now let me try to insert again into this table insert is successful insert a surface will again let me try to select select will show these two records that has been inserted with the two rows of data now let us try to dig it till it come out is very simple two rows have been deleted let's try to select there is nothing in the table right now now let's try to drop the table drop table is successful now if we try to select table does not exist if we try to select from the catalog table there is no rows so friends here I have showed you how to create a database create a schema and insert data into our table and then finally drop the table and delete all the data as well we will finally quit by typing slash q and we will exit the post press thank you very much if you liked the video please subscribe to my channel and like it and please give me some comments so that I can make the video better next time thank you very much see you next
Info
Channel: icommand
Views: 70,464
Rating: 4.8321166 out of 5
Keywords: postgresql
Id: jNIdcrQsfYo
Channel Id: undefined
Length: 7min 17sec (437 seconds)
Published: Mon Jan 18 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.