-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsqlquery2.sql
More file actions
28 lines (21 loc) · 769 Bytes
/
Copy pathsqlquery2.sql
File metadata and controls
28 lines (21 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Problem Statement
Formulate a query to add a record, where you only fill in columns Roll_no, std_name, Age with the given data:
( 7, Shantnu, 21 )
Information about the table:
Attribute lists of table Students
Attribute | Data Type
Roll_no | INT
std_name | CHAR (200)
Address | CHAR (200)
Phone | CHAR (200)
Age | INT
Note: Print the complete table after adding the values.
Solution:
INSERT INTO Students(Roll_no,std_name,Age) VALUE (7,'Shantnu',21);
SELECT * FROM students;
Output:
+---------+----------+---------+-------+------+
| Roll_no | std_name | Address | Phone | Age |
+---------+----------+---------+-------+------+
| 7 | Shantnu | NULL | NULL | 21 |
+---------+----------+---------+-------+------+