Multiple Choice Questions on SQL
---------------------->>>> Click Here :Subscribe to click <<<<<--------------------------
SQL -- Structured Query Language
Table Create - create table
- CREATE TABLE STUDENTS (
- ID INT NOT NULL,
- NAME VARCHAR (20) NOT NULL,
- AGE INT NOT NULL,
- ADDRESS CHAR (25),
- PRIMARY KEY (ID)
- );
Q1. Which of the following is not a valid SQL type?
- FLOAT
- NUMERIC
- DECIMAL
- CHARACTER
Q2. Which of the following is not a DDL command?
- TRUNCATE
- ALTER
- CREATE
- UPDATE
An UPDATE command is used for managing the data stored in a database. It is an example of a DML command that also includes the INSERT and DELETE commands.
- Only 1
- Only 2
- Depends on no of Columns
- Depends on DBA
- Primary key can store null value, whereas a unique key cannot store null value.
- We can have only one primary key in a table while we can have multiple unique keys
- Primary key cannot be a date variable whereas unique key can be
- None of these
- FOREIGN KEY
- PRIMARY KEY
- UNIQUE
- ALTERNATE KEY
- SELECT city, temperature, condition FROM weather WHERE condition = 'cloudy' AND condition = 'sunny' OR temperature >= 60
- SELECT city, temperature, condition FROM weather WHERE condition = 'cloudy' OR condition = 'sunny' OR temperature >= 60
- SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' AND temperature >= 60
- SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' AND temperature >= 60
- SELECT * FROM student WHERE name LIKE '%p%';
- SELECT * FROM student WHERE name LIKE 'p%';
- SELECT * FROM student WHERE name LIKE '_p%';
- SELECT * FROM student WHERE name LIKE '%p';
- UPDATE User SET LastName = 'Thomas' INTO LastName = 'Michel'
- MODIFY Users SET LastName = 'Michel' WHERE LastName = 'Thomas'
- MODIFY Users SET LastName = 'Thomas' INTO LastName = 'Michel'
- UPDATE Users SET LastName = 'Michel' WHERE LastName = 'Thomas'
- COUNT
- COMPUTE
- SUM
- MAX
Comments
Post a Comment