Writing basic Sql queries for jdbc programming-Tutorial-3



This video deals with writing basic sql queries .I have shown how to create a table and inserting data into it using both the oracle database sqlWorkshop and java programming.
//Writing Sql Queries

we are today going to discuss in detail about the CRUD operations on Database:
CRUD stands for-
C-create
R-Read
U-update
D-delete

1.create
.This command(cmd) is used to create a table in the database
.Here we define the structure of the database
.we define the variables/columns name with their data type
and their size
Syntax:
create table tableName(var1 datatype(size),var2 datatype(size)…);
Insert
.This cmd is used to insert data into the database
Syntax:
insert into tableName values(x,y,z);
note:
.if the variable datatype is Character type use ‘x’
Different data types mainly used are:
1.varchar/varchar2-for character/string variable
ex: name varchar2(20)
2.date-for date type of data
ex: doj date
3.Number-for integer,double,float
ex: empid…

sql tutorials for beginners

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *