-
Junior Member
Syntax
Write syntax in SQL to insert values in the table.
-
Contributing Member
Re: Syntax
There are 3 ways to insert the data into a table.
desc student
no number(3);
name varchar2(20);
address varchar(100);
1)to insert all column values in a table.
syntax:
insert into table_name values(val1,val2,val3..);
Eg:
insert into student values(101,'raj','hyderabad');
2) to insert specified columns
syntax:
insert into table_name(col1,col2) values(val1,val2);
Eg:
insert into student(no,name) values(102,'rk');
3) insert data using other table data.
syntax:
insert into table_name as select col1,col2,col3 from table_name2;
eg:
insert into student values as select no,name,address from student_attendence;
-
Expert Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules