MCQ of Structured Query Language(SQL) With Answer Set -2


1. Which of the following query is correct for using comparison operators in SQL?

A) SELECT sname, coursename FROM studentinfo WHERE age>50 and <80;

B) SELECT sname, coursename FROM studentinfo WHERE age>50 and age <80;

C) SELECT sname, coursename FROM studentinfo WHERE age>50 and WHERE age<80;

D) None of the above



2.How to select all data from studentinfo table starting the name from letter 'r'?

A) SELECT * FROM studentinfo WHERE sname LIKE 'r%';

B) SELECT * FROM studentinfo WHERE sname LIKE '%r%';

C) SELECT * FROM studentinfo WHERE sname LIKE '%r';

D) SELECT * FROM studentinfo WHERE sname LIKE '_r%';



3. Which of the following SQL query is correct for selecting the name of staffs from 'tblstaff' table where salary is 15,000 or 25,000?

A) SELECT sname from tblstaff WHERE salary IN (15000, 25000);

B) SELECT sname from tblstaff WHERE salary BETWEEN 15000 AND 25000;

C) Both A and B

D) None of the above



4. The SELECT statement, that retrieves all the columns from empinfo table name starting with d to p is ..........................

A) SELECT ALL FROM empinfo WHERE ename like '[d-p]%';

B) SELECT * FROM empinfo WHERE ename is '[d-p]%';

C) SELECT * FROM empinfo WHERE ename like '[p-d]%';

D) SELECT * FROM empinfo WHERE ename like '[d-p]%';



5. Select a query that retrieves all of the unique countries from the student table?

A) SELECT DISTINCT coursename FROM studentinfo;

B) SELECT UNIQUE coursename FROM studentinfo;

C) SELECT DISTINCT coursename FROM TABLE studentinfo;

D) SELECT INDIVIDUAL coursename FROM studentinfo;



6. Which query is used for sorting data that retrieves the all the fields from empinfo table and listed them in the ascending order?

A) SELECT * FROM empinfo ORDER BY age;

B) SELECT * FROM empinfo ORDER age;

C) SELECT * FROM empinfo ORDER BY COLUMN age;

D) SELECT * FROM empinfo SORT BY age;



7. Select the right statement to insert values to the stdinfo table.

A) INSERT VALUES ("15", "Hari Thapa", 45, 5000) INTO stdinfo;

B) INSERT VALUES INTO stdinfo ("15", "Hari Thapa", 45, 5000);

C) INSERT stdinfo VALUES ("15", "Hari Thapa", 45, 5000);

D) INSERT INTO stdinfo VALUES ("15", "Hari Thapa", 45, 5000);



8. How to Delete records from studentinfo table with name of student 'Hari Prasad'?

A) DELETE FROM TABLE studentinfo WHERE sname='Hari Prasad';

B) DELETE FROM studentinfo WHERE sname='Hari Prasad';

C) DELETE FROM studentinfo WHERE COLUMN sname='Hari Prasad';

D) DELETE FROM studentinfo WHERE sname LIKE 'Hari Prasad';



9. Constraint checking can be disabled in existing ............. and .............. constraints so that any data you modify or add to the table is not checked against the constraint.

A) CHECK, FOREIGN KEY

B) DELETE, FOREIGN KEY

C) CHECK, PRIMARY KEY

D) PRIMARY KEY, FOREIGN KEY



10. ..................... joins two or more tables based on a specified column value not equaling a specified column value in another table.

A) OUTER JOIN

B) NATURAL JOIN

C) NON-EQUIJOIN

D) EQUIJOIN


Answers:

1.  B) SELECT sname, coursename FROM studentinfo WHERE age>50 and age <80;
2.  A) SELECT * FROM  studentinfo WHERE sname LIKE 'r%';
3.  A) SELECT sname from tblstaff WHERE salary IN (15000, 25000);
4.  D) SELECT * FROM empinfo WHERE ename like '[d-p]%';
5.  A) SELECT DISTINCT coursename FROM studentinfo;
6.  A) SELECT * FROM  empinfo ORDER BY age;
7.  D) INSERT INTO stdinfo VALUES ("15", "Hari Thapa", 45, 5000);
8.  B) DELETE FROM studentinfo WHERE sname='Hari Prasad';
9. A) CHECK, FOREIGN KEY
10.C) NON-EQUIJOIN

You Might also view the following Related Posts

Solved MCQ of SQL Server set-1

1. ........................ is the full form of SQL.
A) Standard Query Language
B) Sequential Query Language
C) Structured Query Language
D) Server Side Query Language

2. SQL Server 2005 NOT includes the following system database .............
A) tempdb Database
B) Master Database
C) Model Database
D) sqldb Database

3. SQL Server stores index information in the ..................... system table.
A) sysindexes
B) systemindexes
C) sysind
D) sysindexes

4. ..................... is a read-only database that contains system objects that are included with SQL Server 2005.
A) Resource Database
B) Master Database
C) Model Database
D) msdb Database

5. The SQL Server services includes .....................
A) SQL server agent
B) Microsoft distribution transaction coordinator
C) Both a & b
D) None of the above

6. ...................... is a utility to capture a continuous record of server activity and provide auditing capability.
A) SQL server profile
B) SQL server service manager
C) SQL server setup
D) SQL server wizard

7. The query used to remove all references for the pubs and newspubs databases from the system tables is ..........................
A) DROP DATABASE pubs, newpubs;
B) DELETE DATABASE pubs, newpubs;
C) REMOVE DATABASE pubs, newpubs;
D) DROP DATABASE pubs and newpubs;

8. ...................... clause specifies the groups into which output rows are to be placed and, if aggregate functions are included in the SELECT clause.
A) ORDER BY
B) GROUP
C) GROUP BY
D) GROUP IN

9. .................. are predefined and maintained SQL Server where users cannot assign or directly change the values.
A) Local Variables
B) Global Variables
C) Assigned Variables
D) Direct Variables

10. Microsoft SQL Server NOT uses which of the following operator category?
A) Bitwise Operator
B) Unary Operator
C) Logical Operator
D) Real Operator

Answers:

1.  C) Structured Query Language
2.  D) sqldb Database
3.  D) sysindexes
4.  A) Resource Database
5.  C) Both a & b
6.  B) SQL server service manager
7.  A) DROP DATABASE pubs, newpubs;
8.  C) GROUP BY
9.  B) Global Variables
10.D) Real Operator

You Might also view the following Related Posts

Solved MCQ of Computer Organization and Architecture set-1



1. A collection of lines that connects several devices is called ..............

A) bus

B) peripheral connection wires

C) Both a and b

D) internal wires



2. A complete microcomputer system consist of ...........

A) microprocessor

B) memory

C) peripheral equipment

D) all of the above



3. PC Program Counter is also called ...................

A) instruction pointer

B) memory pointer

C) data counter

D) file pointer



4. In a single byte how many bits will be there?

A) 8

B) 16

C) 4

D) 32



5. CPU does not perform the operation ..................

A) data transfer

B) logic operation

C) arithmetic operation

D) all of the above



6. The access time of memory is ............... the time required for performing any single CPU operation.

A) Longer than

B) Shorter than

C) Negligible than

D) Same as



7. Memory address refers to the successive memory words and the machine is called as ............

A) word addressable

B) byte addressable

C) bit addressable

D) Terra byte addressable



8. A microprogram written as string of 0's and 1's is a .............

A) Symbolic microinstruction

B) binary microinstruction

C) symbolic microinstruction

D) binary micro-program



9. A pipeline is like ....................

A) an automobile assembly line

B) house pipeline

C) both a and b

D) a gas line



10. Data hazards occur when .....................

A) Greater performance loss

B) Pipeline changes the order of read/write access to operands

C) Some functional unit is not fully pipelined

D) Machine size is limited



Answers:



1. A) bus

2. D) all of the above

3. A) instruction pointer

4. A) 8

5. A) data transfer

6. A) Longer than

7. A) word addressable

8. D) binary microprogram

9. A) an automobile assembly line

10. B) Pipeline changes the order of read/write access to operands


You Might also view the following Related Posts

MCQ of Internet and HTML With Answer Set-2


1. ......................... connects web pages.
A) Connector
B) Link
C) Hyperlink
D) None of the above

2. Internet is ...............................
A) a network of networks
B) an ocean of resources waiting to be mined
C) a cooperative anarchy
D) all of the above

3. .................. is suitable for remote administration of a computer.
A) FTP
B) Shell
C) Remote Procedure Call
D) Telnet

4. Title tag is nested within the ....................... tag.
A) Body
B) Head
C) List
D) Table

5. .................... is a web's native protocol.
A) SLIP
B) TCP/IP
C) HTTP
D) PPP

6. The Internet uses the ........................ as the protocol engine.
A) SLIP
B) HTTP
C) TCP/IP
D) PPP

7. A ............................. is a symbolic name a network administrator assigns to a machine.
A) URL
B) DNS
C) IP address
D) Host name

8.  Which of the following protocol is used for e-mail services.
A) SMAP
B) SMTP
C) SMIP
D) SMOP

9. ...................... is the incoming e-mail server.
A) POP
B) SMTP
C) SMIP
D) PPP

10. ....................... is a uniform naming scheme for locating resources on the web.
A) URI
B) HTTP
C) WEBNAME
D) RESOURCENAME

Answers:

1. C) Hyperlink
2.  D) all of the above
3.  D) Telnet
4.  B) Head
5.  C) HTTP
6.  C) TCP/IP
7.  D) Host name
8.  B) SMTP
9.  A) POP
10. A) URI


You Might also view the following Related Posts

Solved MCQ of Internet and HTML set-1


1. The attribute .................. of <BODY> tag sets color of hypertext links.
A) link
B) vlink
C) alink
D) hlink

2. Default font size of HTML is .......................
A) 2
B) 4
C) 6
D) 3

3. This is a networking device that passes data between networks having similar functions but dissimilar implementations.
A) Hub
B) Modem
C) Gateway
D) Repeater

4. In order to connect to ISP's server you need .......
A) Hand gloves
B) Printer
C) User name and Password
D) None of the above

5. DNS translates .........
A) domain name into IP
B) IP into domain name
C) both a & b
D) domain name into physical address

6. In order to upload a HTML file to a web server, you use
A) HTTP
B) SMTP
C) SIP
D) FTP

7. IEEE stands for ........
A) Institute of estimated elevator efficiency
B) Institute of electrical and economical engineers
C) Institute of Eurasia engineering event
D) Institute of electrical and electronics engineers

8. The regional networks are connected to the corporate networks, this is also called as ........
A) Backbone
B) LAN COM
C) WAN COM
D) Intranet

9. Once the email is sent, the message is broken into pieces called ..................
A) Packets
B) Process
C) Digits
D) Bytes

10. ................... is known as father of World Wide Web.
A) Robert Cailliau
B) Tim Thompson
C) Charles Darwin
D) Tim Berners-Lee


Answers:

1. A) link
2. D) 3
3. C) Gateway
4. C) User name and Password
5. C) both a & b
6. D) FTP
7. D) Institute of electrical and electronics engineers
8. A) Backbone
9. A) Packets
10. D) Tim Berners-Lee

You Might also view the following Related Posts

How to add Feedburner's icon and e-mail subscription box?


google feedburner
After registering and setting up feedburner's account you can place email-subscription box to help your blog readers to subscribe your blog post and to update instantly and reader icon to subscribe for different readers like My Yahoo, Newsgator Bloglines etc. You can make easier to subscribe your blog post for your users by placing HTML codes provided by feedburner.

How to place feedburner email subscription box on your blog



# At first login to your feedburner account. And go to publicize tab.

# And then click on Email Subscriptions option as shown in image below.

feedburner email activation


# Click on on Activate button. 

# Copy the given code under subscription management option shown as in the image below and place this on the required place on your blog. OR  You can place it directly by selecting your blog service provider and clicking on Go button.

feedburner email subscription



How to place feedburner reader icon on your blog


# At first login to your feedburner account. And go to publicize tab.

# And then click on Chicklet Chooser option as shown in image below.

feedburner chicklet chooser


# And then Click on subscribe on reader option.

# Copy the given code and place this on the required place on your blog. 


You may also wanted to view the following related posts

Tags: Link Building  creating quality backlinks  keyword research tools .edu forums or sites

How To Setup Google Feedburner Feed To Your Blog ?


Setup Google Feedburner Feed
Google Feedburner is the best and free to use service to subscribe your blog posts by your blog users. It is the best option for marketing your blog post and informing about your latest post on the blog. It makes easy to update content updates My Yahoo, News-gator  Bloglines and other more. Your content was delivered automatically via web portal, news reader, e-mail etc. It is also possible for site content can be packaged into widgets, gadgets, mobile device, postcard and other news headlines.


How to Setup Google Feed burner Feed to Your Blog? 



Here are the steps to Setup Google Feed burner Feed to your blog.


# At first register to Google Feed burner.


You can register on it, by logging on using Google account.

Click Here To Register To Google Feed burner

Click on the Claim your feeds now button shown in image below.

Feed-burner Feed


On the next page you can move your feed burner feed if you are already using feed burner by log in into it, using feed burner's user and password or you can skip this step if you don't want.

Type blog or feed address on the box and click on next. If your blog have both Atom and Rss feed, you can select any one of them on the next screen. Edit your feed title and address if you want.


# Optimize your Feed using different services.



You can optimize more your feed using different services like Smart Cast, Smart Feed and Feed flare. Smart Cast service link to MP3s, videos, images, and other digital media in your site content and creates enclosures for them automatically. Smart Feed translates your feed on-the-fly into a format (RSS or Atom) compatible with your visitors' feed reader application. Feed Flare places a simple footer at the bottom of each content item, helping you to distribute, inform and create a community around your content. You can link the feed of flicker or Buzznet photos feed on it.


# Publicize your Feed to your or others site or blog.



You can publicize your Feed by using different services like Headline Animator, Buzz bust, Email Subscription, Ping Shot, Feed Count etc. By using Headline Animator you can animate your posts headline on your blog or other blog or site by placing the HTML code. Buzz bust helps you to promote your post by publishing your feeds by placing HTML code on other places. Ping Shot automatically checks for updates from your blog on its own time. You can also place Email subscription box on your blog by acquiring codes from here and Feed count graphic to show your subscribed users. Additionally you can publish your blog posts on social media like Twitter by linking your Twitter account and activating it, by using Socialize tab. You can also place your favorite icon to help users easily subscribe to your feed by using Chicklet Chooser.


You may also visit 

# Redirect your default feed to the Feedburner Feed. 


After successfully setting up your Feed you can redirect your default feeds to the Feed burner Feed.


How to redirect blogger's default feed to the Feedburner Feed?



    1. At first go to your blogger account dashboard and click on settings tab.
    2. Paste your feed burners URL on  post feed redirect  URL box under the other tab.


    Most Effective Tips for Your Link Building Success


    Tips for Your Link Building SuccessGetting quality links from high ranked and quality website is the most important and required task for your site. Such links which are getting from other sites called back-links. Along with creating quality back-links, how you link your site internally and how you place outgoing external links affects your websites success. You can achieve this only by applying most effective and successful link building strategies. If you applied any bad methods for creating links, may harm for your online business after. Google and other major search engines may exclude your site from the search results. So in this post, I am telling you what strategies you should apply for successful link building work for your online success.

    The most effective tips for link building strategies which may be the key success for your website, blog and your whole online business are as follows. 

    Give Quality Content and Services


    The most well known secret for success of any business is their customer's satisfaction. It also applies for your online business and your site or blog. So try to give most useful and quality content and services for your customer or visitors of your site. If you create the content that can impress your users can automatically generate link towards your site or blog after they shared your content on different social networking sites and blogs. 

    Create Blog for Your Site


    Search engines favorite's blogs than sites; also they are updated regularly and help to stay in touch to your users or customers  It makes easy to know about their views and experience towards your service or contents. So if you have website for your business then also create at least one blog for that. You may create a blog using sub domain or distinct directory of same domain or on a distinct domain. For example, for your domain "mycompany.com" you can use "blog.mycompany.com" or "mycompany.com/blog/" or by using blogging sites like "mycompany.blogspot.com" or "mycompany.wordpress.com".

    Write Guest Post on Blog


    There are many blogs on the web, which are opening for guest post on their related subject matter. Find some top blogs which are related to your website or blog and request for guest post. Such posting helps your website or blog to promote and you can also create backlinks to your site. 

    Comment on Blog


    You can promote your website or blog by commenting on the blog post which is related on your subject matter by placing your links on the comment. But I want to strongly recommend that do not spam while placing links on the comment. Your link should be seen natural on the comment.

    Use Social Bookmarking Sites


    Social bookmark is the work of saving bookmarks to a public web site. You can use social bookmarking sites and services for placing links. Top social bookmarking site not only helps for generating more traffic to your site, also help to get quality backlink from there. But avoid to excessive use of those sites, this may harm your sites quality. Post only some important links not all of yours. 


    Use Social Networking Sites


    Today social networking sites like FaceBook, Twitter, Google Plus etc. became most popular for sharing our knowledge and files. So effective utilization of these sites may positively impact your site, which is better than using social bookmarking sites. 

    Use Article Directories


    There are lots of article directories for the purpose of posting and sharing user's articles. You can submit your articles to top article directories such as ezinearticles.com and articlesbase.com. The article that you are posting on those sites can also place your own links to the article body or on the author bibliography. 

    Submit to Web Directories


    Web Directories places the links of websites or blogs in the different categorized view. You can submit your sites link on the related categories. There are lots of free as well as paid web directories. Submitting links on the low quality directories may negatively impact your websites value, so only try to submit your site or blog on the highly ranked quality web directories. 


    Submit Press Releases


    If you have something newsworthy articles that other media will be interested in publishing that, you can submit a press release online and get the news out there. You can promote your site by placing some permissible links on the publishing news article. 

    Build your broken links


    While linking your site from other sites or creating internal links within a site may be generated some broken links, which may decreases your site's value and may give negative users experience. So find your internal and external broken links by using one of the best broken link checker tool and remove that links from the search engine cache and results by using Google URL removal tool

    Create RSS Feed


    You can create RSS feed for your blog by using Google feedburner service and distribute that for subscribed users. If anyone subscribed that or uses that RSS feed on their sites for newsletters automatically increases links towards your site. 

    Do Forum Posting


    Forum posting is also one of the most important links building strategies. You can post comments on the related topic with your link or you can start new thread by registering on any top forum. It is also the best and easy way of getting .edu or .gov links to your site. But do not register on extra large number of forums where you don't go regularly and do not post links in excessive amount which may seem to spam. 

    You can also read about 


    Do Not Buy Links Through Service


    Creating hundreds or thousands of links by using a link building service may result of getting many low quality backlinks to your site. It may get negative impact to your site's quality and on the search results also. So be careful while buying links from link service. 

    Make Keyword Rich Links


    Try to make keyword rich links as far as possible. You should be careful while creating internal links and must use suitable keyword in the anchor text. For example link should be as like "....you can use the keyword research tools ......" but do not use like "...... to get list of keyword research tools click here...." You should also use such technique while creating link in blog commenting, forum posting, article submitting etc. 

    Use Copy and Paste Service


    Copy and paste service is a service provided by Tynt. To use this service you have to register on it, after that it provides JavaScript code which you have to insert on the header part. After inserting code on your site, it inserts the page URL when your content is pasted into emails and social sites. Your traffic increases and SEO improves as more URLs become fixed links.

    Related posts

    Easy Methods to Increase Your Website Speed

    Website speed is the most important factor for SEO. It also affects the popularity of your site, about every 25% of the visitors of the site left that even if it is useful for them for slow loading sites. Google also decided to include website loading speed for website ranking. 

    You can increase your website by performing testing or analyzing your site by using different such tools and performing the actions suggested by them. The main tasks to be performed to achieve such goals are setting an expiry date or maximum age in the HTTP headers, minimizing the HTTP redirects, minimizing the amount of JavaScript need while loading the page, minimizing unnecessary JavaScript, CSS Scripts and HTML, Optimizing images and long running scripts etc. 

    Why Website Speed is Most Important For SEO? 


    Only the fast loading websites can achieve better user experience and can have the minimum exit ratio. They can only achieve their goals in their online business and marketing. Search engine crawlers also prefers faster website, those websites which have slow loading speed may have the greater chance of timing out while crawling them and may be the indexing rate very slow. So your SEO work will be successes only if your website fast. Here I am describing about some most popular and free tools for analyzing the speed and getting appropriate suggestions.

    List of Most Popular Tools for Website Speed Test 


    1. Google Developers Page Speed Tool: It is the most effective and free tool for analyzing and getting suggestion for your website. You don't need to login to the Google to use this tool. You can test your site either by using online tool or by installing toolbar on Mozilla Firefox or chrome browser. You can view the list of suggestions for improving your website's speed listing on High, Medium and Low priority giving with score for out of 100. Correct the errors which are given on suggestion and increase the speed and the score given there. I prefer it as the best tool among all the others. 

    2. Yslow Tool: Yslow is a tool, which analyzes the Web Pages and gives information about why they are slow based on Yahoo's rules for high performance websites. It grades the webpage based on the predefined rule set and also offers the suggestions for improving the performance. You can install its tools on most of the main browsers. YSlow's web page analysis is based on the 23 of 34 rules provided by Yahoo!'s Exceptional Performance team. It gives different grades from A to F based on the score gained for each different rule. 

    3. Webpagetest Online Tool: By using this tool you can run a free website speed test from multiple locations around the world using real browsers and at real consumer connection speeds. You can run simple test as well advanced test. You can get the result of the speed test on waterfall charts and can get useful suggestion or tips for increasing the speed of your site. 

    4. Pingdom Website Speed Test Tool: It is also the full page speed test tool to test your website and analyze that. You can learn about how to make the website faster and can apply that tips for your site. It is to be a easy to use tool to help optimize the performance of your website which examines all the parts of web page, you can view file size, load times, total website speed and also about every single element like HTML, JavaScript, CSS files and images. 

    By effectively optimizing the speed of your site can achieve the best for Search Engine Optimization work. If you have any comments about this post or you know about any ideas for speeding up the site and about any other new tools can post on the comment session. I will always welcome your response.

    How to Utilize Google Services for effective SEO?


    How to Utilize Google Services
    Everyone knows that Google is the emperor of the web. It is the largest web search engine and it does not just a web search. There are many services offered by Google for different purposes. Some of those services may extremely useful for search engine optimization work. Almost all of the SEO experts utilize those services for better SEO. If anyone can achieve successful utilization of them definitely get benefit from their sites. Here I have listed here some important services of Google for Search Engine Optimization purposes and their effective methods of utilization. 

    1. Google Webmasters: It is the most important service provided by Google to optimize their site for website owners. They provides different types of tools for websites Health, Traffic and Optimization for search engines and also provides helps and guidelines for creating quality website. Using this webmaster service, you can do the following activities to optimize your site for search engines. 

    a. Submit your site for crawling by signing up into webmasters tools and verify that using given    instructions. 

    b. Submit your website or blog xml sitemap to get notified about your content for indexing your site. 

    c. Get report about your search queries, indexing status, internal and external links on your site and many more others. 

    d. Remove 404 error pages of your site and other broken links located on other external sites by using its      URL removal tool. 

    2. Google Analytics: It is the service for analyzing about the traffic on your site and gets reported about them by different criteria used.  The different types of reports like the number of total visits, new visits and repeated visits, average visit duration, real time visits and the traffic sources provided by this service helps us for better user experience for our site, which helps to improve based on that. 

    3. Google Web search: You can use this service for knowing the indexing and search result appearing status for your site also can submit your site on the search engine. 

    4. Google Blog Search: You can submit your blog here for indexing your blog on this blog search site. 

    5. Google Trends: This service of Google may very helpful for getting idea and deciding what topic or keywords are important for your website. You can get the reports of searching volume based on the specific location and keywords. 

    6. Google Adwords:  This service is for pay per click (PPC) advertising, you can place ads by using your suitable campaign. Also you can use its Keyword Research Tool to do keyword research for your website. 

    7. Google Bookmarks: You can use this service to bookmark your favorite websites along with your own website. 

    8. Google Groups: You can use this service to participate on groups or created you own groups for discussions about any topic. You can do SEO for your site by creating a group about the topic about your site and discussing about that topic. 

    9. Page Speed Insights: It is the tool or service provided by Google Developers to analyze the loading speed of your website. You can view the list of suggestions for improving your website's speed listing on High, Medium and Low priority giving with score for out of 100. Correct the errors which are given on suggestion and increase the speed and the score given there. 

    10. Structured Data Testing Tool: You can check your websites markup and make sure that Google search engine can extract the structured data from your web page. This tool will also display the markup tags found on a specific web page, as well as a preview of how that page might appear in Google search results. 

    By effectively utilizing the services I have listed above can be move up your site for Search Engine Optimization. If you have any comments about this post or you know about any Google services which may be used for SEO purpose can post on the comment session. I will always welcome your response.

    فيديو الأسبوع