Translate

Friday 17 September 2021

How to insert record in sql table in telugu 10

 https://youtu.be/aNXu0NWwb2g

-----------------------------------------------
DROP TABLE <tablename>;

--
The SQL INSERT INTO Statement
The INSERT INTO statement is used to insert new records in a table.

INSERT INTO Syntax
It is possible to write the INSERT INTO statement in two ways.

The first way specifies both the column names and the values to be inserted:

INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);

+---------+-------------+------+-----+---------+-------+
| Field   | Type        | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| fid     | int(11)     | YES  |     | NULL    |       |
| fname   | varchar(10) | YES  |     | NULL    |       |
| fmobile | int(12)     | YES  |     | NULL    |       |
| floc    | varchar(20) | YES  |     | NULL    |       |
| fma     | char(1)     | YES  |     | NULL    |       |
+---------+-------------+------+-----+---------+-------+
insert into faculty (fname,fid,fmobile,fma,floc) values ('venkat1',5,9059868766,'y','hyd');
insert into faculty (fname,fid,fma,floc) values ('venkat1',5,'y','hyd');
-------------------------------
If you are adding values for all the columns of the table, you do not need to specify the column 
names in the SQL query. However, make sure the order of the values is in the same order as
 the columns in the table. The INSERT INTO syntax would be as follows:

INSERT INTO table_name
VALUES (value1, value2, value3, ...);
insert into faculty values(33,'ramesh',59868766,"munipeda",'y');

INSERT INTO table_name(column_name) VALUES (data);

INSERT INTO table_name 
            (column_name, column_name) 
VALUES      (value, value), 
            (value, value), 
            (value, value);
insert into faculty (fname,fid,fmobile,fma,floc)
values ("ram",44,88888,'y','vij'),('sure',55,7777,'n','pune'),('lax',99,22222,'y','chicgo');
---------------
create table ram(
   id int,
  name varchar(30)
);
insert into ram values(2,"prav"),(3,"rame");










CREATE TABLE people
  (
    first_name VARCHAR(20),
    last_name VARCHAR(20),
    age INT
  );
INSERT INTO people(first_name, last_name, age)
VALUES ('Tina', 'Belcher', 13);
INSERT INTO people(age, last_name, first_name)
VALUES (42, 'Belcher', 'Bob');
INSERT INTO people(first_name, last_name, age)
VALUES('Linda', 'Belcher', 45)
  ,('Phillip', 'Frond', 38)
  ,('Calvin', 'Fischoeder', 70);
DROP TABLE people;

SELECT * FROM people;

show tables;

No comments:

Post a Comment

Note: only a member of this blog may post a comment.