Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can anyone explain me about this SQL Query

Tags:

sql

Select Null as Empty from (select * from  TblMetaData)
like image 843
Rishabh Ohri Avatar asked Mar 17 '10 08:03

Rishabh Ohri


People also ask

How do you explain SQL to someone?

1. How do you explain what SQL is to someone without a technical background? SQL or Structured Query Language is a standardized programming language used to access or manipulate data in a database. It was designed to update, add, delete a row of data and retrieve subsets of information within the database.

Can you explain how SQL works?

SQL uses a set of commands to manipulate the data in databases. Examples include SQL INSERT, which is used to add data to database tables; SQL SELECT, which retrieves data from database tables; and SQL UPDATE, which modifies existing database records.

How do you talk about SQL in interview?

Here's a good example answer: “I feel there can be a real sense of achievement working in SQL, from solving broken queries to designing new ones! There is so much to learn working with SQL, it's an exciting and growing coding language and I want to expand my query design abilities through this role.”


2 Answers

Looks like, it is trying to get null rows for the same number of rows in tblMetaData.

EDIT: This could be written as
SELECT Null AS Empty FROM tblMetaData

like image 70
shahkalpesh Avatar answered Oct 04 '22 15:10

shahkalpesh


It will yield a result set with one column named Empty which only contains NULL values. The number of rows will be equal to the number of rows available in TblMetaData.

like image 35
Anders Abel Avatar answered Oct 04 '22 16:10

Anders Abel