1.

An attribute A of datatype varchar(20) has the value “Avi”. The attribute B of datatype char(20) has value”Reed”. Here attribute A has____ spaces and attribute B has ____ spaces.(a) 3, 20(b) 20, 4(c) 20, 20(d) 3, 4I had been asked this question in quiz.My question is taken from SQL Basics and SQL Data Definition in portion SQL : Queries, Constraints and Triggers of Database Management

Answer» RIGHT answer is (a) 3, 20

Easy EXPLANATION - Varchar changes its length accordingly whereas char has a specific length which has to be FILLED by either letters or SPACES.


Discussion

No Comment Found

Related InterviewSolutions