![]() Q.9 Write an SQL query for printing the FIRST_NAME after replacing ‘A’ with ‘a’. The query that you can use is: Select distinct length(DEPARTMENT) from Worker Q.8 What is an SQL query for fetching the unique values from the DEPARTMENT column and thus printing is the length?Īns. The query that you can use is: Select LTRIM(DEPARTMENT) from Worker 7 Write an SQL Query for printing the DEPARTMENT from Worker Table after the removal of white spaces from the left side.Īns. You must read about SQL Query Optimization tools The query that can be used is: Select RTRIM(FIRST_NAME) from Worker Q.6 What is an SQL Query for printing the FIRST_NAME from Worker Table after the removal of white spaces from right side.Īns. The query that can be used is: Select INSTR(FIRST_NAME, BINARY'a') from Worker where FIRST_NAME = 'Ayushi' Q.5 What is an SQL query for finding the position of the alphabet (‘A’) in the FIRST_NAME column of Ayushi.Īns. The query that can be used is: Select substring(FIRST_NAME,1,3) from Worker Q.4 Write an SQL query for printing the first three characters of the column FIRST_NAME.Īns. The query that you cam use is: Select distinct DEPARTMENT from Worker Q.3 What is an SQL query for fetching the unique values of the column DEPARTMENT from the WORKER table?Īns. The query that you can use is: Select upper(FIRST_NAME) from Worker Q.2 What is an SQL Query for fetching the “FIRST_NAME” from WORKER table in upper case?Īns. The query that you can use is: Select FIRST_NAME AS WORKER_NAME from Worker Q.1 Write an SQL query for fetching “FIRST_NAME” from the WORKER table using as alias.Īns. So, let’s practice the SQL Query through the best and important SQL Query Interview Questions. Now you know how to create table and insert values in it through SQL Query. 30 Complex SQL Queries Interview Questions and Answers So, let’s start SQL Query Interview Questions and Answers. In this way, you can create and insert values into the table. ![]() (WORKER_REF_ID, WORKER_TITLE, AFFECTED_FROM) VALUES Query to insert into table Title INSERT INTO Title Query to create table Title CREATE TABLE Title ( (WORKER_REF_ID, BONUS_AMOUNT, BONUS_DATE) VALUES Query to insert into table Bonus INSERT INTO Bonus Let’s revise the primary and foreign key in SQL v. Query to create table Bonus CREATE TABLE Bonus ( (WORKER_ID, FIRST_NAME, LAST_NAME, SALARY, JOINING_DATE, DEPARTMENT) VALUES Query to insert into the Table Worker INSERT INTO Worker WORKER_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, Query to create the Table CREATE TABLE Worker ( Query to create the Database CREATE DATABASE ORG How to Create Table in SQL?īelow are the tables which you will createthrough the SQL queries. Stay updated with latest technology trends
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |