The INSERT INTO statement is used to insert a new row in a table
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...) is the Syntax
Example:
INSERT INTO emp (ename, sal, job, ID, deptno)
Values ('smitha', 100, 'manager', 1, 10), ('rajesh', 200, 'Asst manager', 2,20);
Other way of inserting values into table:
INSERT INTO emp
SELECT 'smitha', '100', 'manager', '1', '10'
UNION ALL
SELECT 'rajesh', '200', 'Asst manager', '2','20'
will throw same result of inserting values into emp table
Comments
Post a Comment