9 Structured Query Language Previous Year Question: The Columns Used in A Table Are Called
9 Structured Query Language Previous Year Question: The Columns Used in A Table Are Called
Solution
1. Distinct
2. Attributes
3. Create table inventory item code mt not null primary key, despite
char(30) not null.ock_qty mt, rol mt);
4. SUM().AVG()
5. a) Alter table patient add(Doctorname char(20) not null);
b) Update patient set Doctorname= ‘LINDA’where IPNO=30;
c) Select ‘from patient group by Doctorname;
d) Select * from patient where age between 20 and 30;
e) Select * from patient where PatientName like ‘An%’;
6. Data Redundancy
7. 1) Sum() – To find the total of column name specified as the
argument.
2) Avg()- To find the average of column name speci-fied as the
argument.
3) Min() – To find the smallest value of column name specified as
the argument.
4) Max() – To find the largest value of column name specified as the
argument.
5) Count()- To find the number of values in the col-umn specified as
the Argument.
8. DROP TABLE <table name>
9. A view is a virtual table. That means it really does not exist. We can
create a view based upon a table. If we create a view all users cannot
see the entire data base.It gives high security.
DDL Commands are Create table, Alter table and Drop table.
It is declared as varchar(size).
34. a) varchar
36.
a)
The strings
(i) and
(iv) only
(b)
(c)
(d)
b) (i)
(ii)
(iii)
(v)
(vi)
We can add a new column to the existing table using the following
syntax,
We can also cha rige or modify the existing column in terms of type or
size using the following syntax,
ALTER TABLE<tablename>MODIFY(<column> <newtype>);
57. DISTINCT