aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Multi-Database Technologies: IMS DB, SQL/Oracle, and Hibernate
  • Suppose emp table contains 5 records then Select 1 from e...
Multiple choice technology databases

Suppose emp table contains 5 records then Select 1 from emp; o/p ?

  1. 5

  2. 1

  3. five times 1

  4. one time 5

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

SELECT 1 from emp returns the constant value 1 for each row in the table. With 5 records, it outputs the value 1 five times (5 rows x 1 column). This is different from SELECT COUNT(*) which would return just 5.

Keep practicing — related questions

  • What will be the output of following Select 8 from Emp ? Emp table has 10 rows
  • Consider an emp table having columns empno, empname, salary Which of the following queries sort emp table b...
  • Consider the emp table having columns empno, ename Which of the following SQL query fetches empno that occu...
  • If emp table is having 10 rows, which of the below queries executes successfully without error? A) delete f...
  • Use these data for the following Questions EMPNO ENAME SAL A822 RAMASWAMY 3500 A812 NARAYAN 5000 A973 UMESH...
  • Use these data for the following Questions EMPNO ENAME SAL A822 RAMASWAMY 3500 A812 NARAYAN 5000 A973 UMESH...
  • Emp table has 10 rows. How many rows will be fetched against the following query? Select 10 from emp where ...
  • If emp table having 10 records what is the output of : select * from emp where rownum=8;
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy