SQL SERVER – Take the Quiz for a chance to win a Quadcopter Drone

SQL SERVER - Take the Quiz for a chance to win a Quadcopter Drone quadcompter It has been a long time since we ran quiz. So let us get ready for a quiz. The quiz has two parts. You have to get both the parts correct to win Quadcopter with Camera (we will call it drone). We will be giving away a total of 2 Quadcopters.

The quiz is extremely easy and I will ship the Drone anywhere in the world where Amazon will ship it.

Let us jump directly to the quiz. Please complete both the parts the contest.

Contest Part 1: Brain Teasers

Please execute following script and answer the questions.

SQL SERVER - Take the Quiz for a chance to win a Quadcopter Drone embquiz

-- What will be the output of the following? and Why?
SELECT 28E3
-- What will be the output of the following? and Why?
SELECT 28F3
-- What will be the output of the following? and Why?
SELECT F328

Contest Part 2: Download and Activate Rapid SQL

Question: Download and Activate Rapid SQL.

Hint: You have to download and activate Rapid SQL. If you do not activate Rapid SQL, you will be disqualified for the contest. Why take risk, let us start!

SQL SERVER - Take the Quiz for a chance to win a Quadcopter Drone emb33

That’s it!

Just answer above questions in the following comments area, in following format.

Remember:

  • Download RapidSQL from this link.
  • Use comments area right below the blog to take participation in the contest
  • Answer before November 21, 2014 midnight GMT.
  • The winner will be announced on December 8.
  • The winner will be selected randomly from all the valid answers.
  • All the valid answers will be kept hidden till December 24, 2014.
  • There will be a total of two winners.
  • The contest is open for any country of the world where Amazon ships products.

Reference: Pinal Dave https://blog.sqlauthority.com/ )

Previous Post
SQL SERVER – FIX: ERROR : Msg 3136, Level 16, State 1 – This differential backup cannot be restored because the database has not been restored to the correct earlier state
Next Post
SQL SERVER – FIX – Error: One or more files do not match the primary file of the database

Related Posts

No results found.

21 Comments. Leave new

  • — What will be the output of the following? and Why?
    SELECT 28E3

    Output: because Here E means exponent with base 10
    ———————-
    28000

    (1 row(s) affected)

    — What will be the output of the following? and Why?
    SELECT 28F3

    Output: because this will take F2 as column alias and 28 as static value.
    F3
    ———–
    28

    (1 row(s) affected)

    — What will be the output of the following? and Why?
    SELECT F328

    Output: because F328 is not numeric so this is not static value & It will assume F328 as column name which is invalid.
    Msg 207, Level 16, State 1, Line 1
    Invalid column name ‘F328’.

    Reply
  • Hello
    1) SELECT 28E3
    Show 2800 because e3 is exponent
    2) SELECT 28F3
    Sshow 28 with column name f3
    3) SELECT F328
    Show error message “Invalid column name F328”

    Reply
  • Jeffery Moberly
    November 10, 2014 9:25 pm

    28E3 is notation for 28 * 10^3 which equals 28 * 1000 = 28000

    28F3 will act the same as 28 F3 or 28 AS F3 since F is a letter and there are no single quotes it assumes that is the start of the column name

    E328 will throw Msg 207, Level 16, State 1, Line 5 because SQL Server sees it as a column name but no value

    Reply
  • Part 1
    SELECT 28E3
    This selects the number in scientific notation so it’s selecting the expression 28 x 10^3 (so it selects 28000 under column undefined)
    SELECT 28F3
    This selects the number 28 and then aliases it as F3 (so it selects the data 28 under column F3)
    SELECT F328 or E328
    This errors out because it tries to select the literal F328 or E328 which is not a thing. If it was it would select what ever that name represents. I suppose if you had a function or stored procedure with no parameters called F328 or E328 it would output whatever that was defined as)

    Pat 2
    Done? I’m not sure how to respond to this part aside from I promise I really did the thing.

    Reply
  • Part 1
    1) 28000 — scientific notation; 28E3 = 28 x 10^3 = 28,000
    2) Query Error — unrecognized token: “28F3”
    3) Query Error — no such column: F328

    Part 2
    registered; Trial License (Expires 2014-11-24)

    Reply
  • The answer of SELECT 28E3
    is 28000 E means 28 multiplied by the ten to the power 3(i.e. 1000) because sql server treat it as floating point

    the answer of SELECT 28F3 is 28 because SQL treats 28 as number(i.e. numeric) and F3 as column name (i.e.t- sql syntax)

    the answer of SELECT F328 is an error i.e. invalid column name as there is no value(i.e. neither integer nor character string placed inside ‘ ‘) because SQL server try to read it as the value in a column
    with regards

    Reply
  • SELECT 28E3
    Out Put :28000
    SELECT 28F3
    Out Put :28 with Column Name F3
    SELECT F328
    Out Put:Invalid column name ‘F328’

    Reply
  • SELECT 28E3 returns 28000 w/o column name. It is a scientific format of representing numbers with floating decimal point. xEn = x*power(10, N), in this particular case 28E3 = 28*10^3 = 28000.

    SELECT 28F3 returns 28 with column name F3. Column names in SQL Server can not start from numbers therefore SQL Server treats 28 as a value and F3 as column alias, space and “as” are optional. More verbose format of writing the same is 28 as F3.

    SELECT F328 return an error “Invalid column name ‘F328′” because SQL Server treats it as column name because it starts as with letter and it can not find it in any part of the query. Strings suppose to start with ‘.

    Reply
  • ANSWER:
    1. SELECT 28E3 -> 28000 (E stands for exponents, so SELECT 28E4 -> 280000)
    2. SELECT 28F3 -> F3 (column alias), 28 (value) (so SELECT 30G9 -> G9 column alias, 30 value)
    3. SELECT F328 -> Invalid column name

    Reply
  • 1. Fixed defined float value in exponential writing; 28E3 = 28^3 = 28000

    No column name
    ———————
    28000

    (SELECT 28 will return the value ’28’. E is the exponential function.)

    2. Object qualifier must start with a letter or underscore; therefore the engine interprets the first numeric part as the value and the letters as the qualifier aka column alias
    Value = 28, alias = F3

    F3
    ————
    28

    3. Object qualifier must start with a letter or underscore, and ours starts with ‘F’ but no such object exists
    Msg 207, Level 16, State 1, Line 1
    Invalid column name ‘F328’.

    Reply
  • 28000 — this is treated as Exponential
    28 and Column Name as F3…Becasue first nonmumeric will consider as Alias
    It throws an error as tries to find Column

    Reply
  • Hi,

    1. SELECT 28e3
    Output:
    28000 with header (no column name)

    Reason : when execute we execute above select then 28e3 considering as as Float number because “e” use for float number

    2.SELECT 28S3
    Output:
    28 with header S3

    Reason :showing S3 as column header because “S” is not any reserve alphabet in sql and if we write any alphabet except “e” in select statement with number then it treating that alphabet as column Alias name.

    3.SELECT F328
    Output:
    Msg 207, Level 16, State 1, Line 1
    Invalid column name ‘F328’.

    Reason : ‘F328’ is not any reserve key word for any function ,stored procedure or any other sql object

    Reply
  • — What will be the output of the following? and Why?
    SELECT 28E3
    — 28000. It is a number in scientific notation (28E+3)

    — What will be the output of the following? and Why?
    SELECT 28F3
    — 28. F3 is understood as column name (28 as F3)

    — What will be the output of the following? and Why?
    SELECT F328
    — Syntax error: could not be resolved to a number

    Reply
  • SELECT 28E3 yields 28,000 because 28E3 is a number with 3 zeros to the right of the number before the E

    SELECT 28F3 yields 28. F3 is considered an alias.

    SELECT F328 bombs because F3 is not a number

    Reply
  • — What will be the output of the following? and Why?
    SELECT 28E3
    value 28000 with no filed name – this is Scientific notation
    — What will be the output of the following? and Why?
    SELECT 28F3
    value 28, F3 filed name soon as you stopped doing numbers you are in field name description
    — What will be the output of the following? and Why?
    SELECT F328
    Error, filed name does not exist

    Reply
  • SELECT 28E3 — Output = 28000. This is called floating point notation or scientific notation. It is 8×10³, which is 8000. The e stands for 10th exponent. So contactenate 2 and 8000 equals 28000.

    SELECT 28F3 — Output = 28. F3 acts as an alias that leaves the value 28.

    SELECT F328 /* This sql statement will fail (Msg 207, Level 16, State 1
    Line 1 Invalid column name ‘F328’.) as it is not string and it needs to be in single quotes e.g SELECT ‘F328’ */

    Reply
  • unable to download rapid sql

    Reply
  • 28000 – interpreted as scientific notation (28 * 10^3)
    28 (Column name = F3. 28 interpreted as an int, the other nonnumeric interpreted as the column name)
    F328 – not parseable at all, could be if quoted

    Reply
  • — What will be the output of the following? and Why?
    SELECT 28E3

    Output: 28000 (no column name)
    Reason: 28E3 reads “25 times (10 to the power of 3)”

    — What will be the output of the following? and Why?
    SELECT 28F3

    Output: 28 (column “F3”)
    Reason: 28E3 reads “25 with column alias F3”

    — What will be the output of the following? and Why?
    SELECT F328

    Output: “Invalid column name ‘F328’.”
    Reason: It doesn’t match any constant or predefined variable and as no table is referenced it cannot be any column name.

    Reply
  • Joe Gakenheimer
    November 21, 2014 3:42 am

    * I have installed and registered Rapid SQL XE6. Now for solving the questions.

    SELECT 28E3
    /*
    The query “SELECT 28E3” will return 28000. The “28e3” is the same as 28 * 103 or 28 times 3 to the Power of Ten.

    In scientific notation, this is sometimes used to make large numbers more readable, but it is a real number and SQL Server sees it as a number.

    In this example the scientific notation has 28 multiplied by the product of the significant of 3 multiplied by the power of ten.
    */

    SELECT 28F3
    /*
    The query “SELECT 28F3” will return 28 with the alias “F3.” Once the number is complete, the next valid character is the alias of the value.

    We’ve probably all seen this before at work where poor coding standards and format sometimes leaves us with queries in similar shape.
    */

    SELECT F328
    /*
    The query will return an error as the first item in the statement “F” is a non-numerical character, so it must have apostrophes around it.
    */

    Reply

Leave a Reply