Ms. Shalini has just created a table named “Employee” containing columns Ename, Department, Salary. -Technology

1 Answer

Answer :

SQL command to add a primary key column:Alter table employee add empid int primary key;Importance of Primary key in a table:Primary key column is used to uniquely identify each record of the table. A column defined as primary key cannot have a duplicate entry and can't be left blank.

Related questions

Description : While creating a table named “Employee”, Mr. Rishi got confused as which data type he should chose for the column “EName” out of char and varchar. -Technology

Last Answer : Varchar would be the suitable data type for EName column as char data type is a fixed length data type while varchar is a variable length data type.Any employee‟s name will be of variable length so it‟s advisable to choose varchar over char data type.

Description : A table named School (containing data of students of the whole school) is created -Technology

Last Answer : AdmissionNo should be set as the primary key because admission numbers are unique for each and every student of the school, which is not possible in the case with RollNo and Name.

Description : Anjali writes the following commands with respect to a table employee having fields, empno, name, department, commission. -Technology

Last Answer : This is because the column commission contains a NULL value and the aggregate functions do not take into account NULL values. Thus Command1 returns the total number of records in the table whereas Command2 returns the total number of non NULL values in the column commission.

Description : Help Ramesh in identifying any two columns for a table named student along with their suitable data type. -Technology

Last Answer : Column NameData TypeRollNoIntegerNameVarchar(20)

Description : Mr. Manav, a database administrator in “Global Educational and Training Institute” has created following table named “Training” -Technology

Last Answer : i. Select count(name) from training where name like ‘Ms.%’;ii. Select * from training where fee is NULL;iii. Select city, fee from training where topic = ‘Cyber Security’;iv. Alter table training add feedback varchar(20);

Description : Ms. Achla, works as a Programmer in a survey firm named “National Survey Foundation”. In her current project, she is supposed to design -Technology

Last Answer : S. No.Control used to inputControl1TRAINEE’S NAMETextField2TRAINING LOCATIONRadio Button/Combo Box3GRADE THE SESSION(Excellent, Good, Satisfactory, Unsatisfactory)Radio Button/Combo Box4SUGGESTIONSText Area

Description : Ms. Juhi, works as an IT Executive in a health insurance company named 'Total Health'. She has been assigned a task to design -Technology

Last Answer : S. No.Control used toControl1CUSTOMER‟S NAMETextField2CUSTOMER‟S CITYComboBox3POLICY TYPE (Individual/Family)RadioButton4INCLUSIONS (Critical Illness/Accidental Coverage/Health Checkup/Others)CheckBox/ListBox

Description : Write the command using Insert() function to add a new column in the last place(3rd place) named “Salary” from the list Sal=[10000,15000,20000] -Technology

Last Answer : EMP.insert(loc=3,column=”Salary”,value=Sal)

Description : Manager's salary details are to be hidden from Employee Table. This Technique is called as (A) Conceptual level Datahiding (B) Physical level Datahiding (C) External level Datahiding (D) Logical level Datahiding

Last Answer : (C) External level Datahiding

Description : What is the difference between ‘Rows’ and ‘Columns’ in a table? -Technology

Last Answer : Distinguish between data and information are as follows:DataInformationIt is a raw fact.It is a process form of data.It considers facts symbols, images for reference or analysis.It considers knowledge derived from study, experience or instruction.e.g. 23 is data.e.g age = 23 is information

Description : In a table, columns are called ………. and rows are called ………… . -Technology

Last Answer : In a table, columns are called fields and rows are called records.

Description : The……………… attribute is used to span two or more columns in a table. -Technology

Last Answer : The colspanattribute is used to span two or more columns in a table.

Description : The cols value in the rules attribute, allows you to display table border only between columns. -Technology

Last Answer : True The cols value in the rules attribute is drawn between columns only.

Description : Given the table ‘Player’ with the following columns : -Technology

Last Answer : Output of the given statements(i)AVG (POINTS)30(ii)COUNT(POINTS)2

Description : ‘Class’ table has columns RNO and NAME. The following statements are executed: -Technology

Last Answer : Output for the 1st SELECT * FROM Class ; statement -RNONAME5Rajeev6Chris7FerozeOutput for the llnd SELECT * FROM Class; statementRNONAME5Rajeev6Chris

Description : Name two possible primary keys for an Employee table. -Technology

Last Answer : Possible primary keys for an Employee table are emp code, emp phone number.

Description : Consider the following table: Employee EmpNo EmpName Designation -Technology

Last Answer : 1. EmpNo can be selected as a primary key.2. EmpName is having unique values, but there is no guarantee that if more employees are included then there would not be multiple people with similar names.So, in future, its values may be duplicate. Thus, it cannot be made as a primary key.

Description : Out of the following, which one is the most appropriate data field in context of employee table, if only one of these is required? -Technology

Last Answer : (b) Date of birth is the most appropriate data field in the context of the employee table.

Description : Consider the table ‘Employee’. -Technology

Last Answer : SELECT DISTINCT (Location) FROM Employee ;

Description : Yesterday, Rahul created a file named detail.txt and saved it. -Technology

Last Answer : He can find his file by using Search option.

Description : In a school, a database named “school” is created in mysql whose password is “cbse”. Smith is trying to add a new record of a student having details -Technology

Last Answer : import mysql.connectormydb = mysql.connector.connect{host='localhost',user='root',passwd='cbse',database='school'}mycursor = mydb.cursor()mycursor.execute('INSERT INTO student values(3,'Michelle', 'Agartala');')mydb.commit()

Description : While creating the table Student last week, Ms. Sharma forgot to include the column -Technology

Last Answer : ALTER TABLE Student ADD Game_Played VARCHAR (30) ;

Description : Consider a table SALESMAN with the following data: SNO SNAME SALARY BONUS DATE OF JOIN A01 Beena Mehta 30000 45.23 29_10_2019 A02 K. L. -Technology

Last Answer : alternative answer

Description : The following table named SummerCamp shows part of the information kept on children attending the summer camp in Shimla. -Technology

Last Answer : 1. Number of fields-62. Number of records-73. If a new child joins the SummerCamp, then SummerCamp would add a record to the table.4. If a child is shifted from one group to another, then ... the SummerCamp, then SummerCamp would delete a record of that child from the table.6. Text and Date/Time.

Description : Observe the table named “Training” given above carefully and predict the output of the following queries: -Technology

Last Answer : (i) New DelhiFaridabadGurugram(ii) 2(iii) 11000(iv) Ms. Neena

Description : What is the degree and cardinality of the above given table named ‘Training’. -Technology

Last Answer : Degree: 6Cardinality: 5

Description : Observe the given table named “Loan” carefully and predict the output of the following queries: -Technology

Last Answer : (i)(ii)(iii)(iv)

Description : What is the degree and cardinality of the above given table named ‘Training’. -Technology

Last Answer : Degree: 6Cardinality: 5

Description : A relationship cannot be created with the help of a table. -Technology

Last Answer : False A relationship is a connection between two tables of data.

Description : For what, Memo data type is used? (a) To add table (b) To store objects created in other programs -Technology

Last Answer : (c) As we know, Memo provides character upto 65536 so, it is used for long text entries.

Description : What are table sections? How can they be created? -Technology

Last Answer : In HTML tables, there are three different sections: header, body and footer. These sections can be created using (header section), (body section) and (footer section) tags.e.g MonthSavings January$100February$80Sum$180

Description : Ms. Archana, a class XI student has just started learning MySQL. Help her in understanding the basic difference between -Technology

Last Answer : ALTERUPDATEIt s a DDL command.It s a DML command.It can be used for the following purpose:To add a new column.To remove an existing column.To modify a column.To add/remove a constraint.It s ... Delhi ;suitable command:(i)Show Databases(ii) Use City(iii) Drop Database Clients(iv) Drop table Club

Description : Which of the following is not a term of MS-Excel? a. Cells b. Rows c. Columns d. Document

Last Answer : d. Document

Description : Which of the following is not a term of MS-Excel? a. Cells b. Rows c. Columns d. Document

Last Answer : d. Document

Description : What is the best alternative to MS Dynamics for a 200 employee non-profit?

Last Answer : my job is to monitor the fundng and programs provided by non profits in ourcounty and my fiscal person typically recommends quickbooks. I don’t know much about that software… But I hope this information is helpful for you.

Description : Individual, Paid employee, Confidential officer, a Government department

Last Answer : Find the odd one : (I) Individual, Paid employee, Confidential officer, a Government ... Chamber of Commerce, Consumer Co-operative stores.

Description : Which of the following is not a primary concern for your Finance Department? a. Acquiring capital b. Setting credit policies for customers and suppliers c. Employee turnover d. Establishing a dividend policy e. Capital structure of the firm

Last Answer : c. Employee turnover

Description : As a new employee, John is most likely to look to which one of the following to learn the ethical culture of his new organisation? A)Coworkers B)Customer contact employees C)Other new employees D)The legal department E)Top management

Last Answer : E)Top management

Description : If you are a salary employee, after working 67 hours in one week should you not be paid overtime?

Last Answer : property taxes are fully deductible from your income so you should be able to look on your pay stub. But the address was not a valid address so there was no way to look it up but a website you could use to look up your property taxes is http://www.city-data.com/city/Brooklyn-New-York.html

Description : In a system designed to work out the tax to be paid:An employee has £4000 of salary tax free. The next £1500 is taxed at 10% the next £28000 is taxed at 22%. Any further amount is taxed at 40% ... ) £4800; £14000; £28000 b) £5200; £5500; £28000 c) £28001; £32000; £35000 d) £5800; £28000; £32000

Last Answer : d) £5800; £28000; £32000

Description : In a system designed to work out the tax to be paid: An employee has £4000 of salary tax free. The next £1500 is taxed at 10%. The next £28000 after that is taxed at 22%. Any further amount is taxed ... of these is a valid Boundary Value Analysis test case? A. £28000. B. £33501. C. £32001. D. £1500

Last Answer : B. £33501.

Description : Which of the following is a legal expression in SQL? (A) SELECT NULL FROM EMPLOYEE; (B) SELECT NAME FROM EMPLOYEE; (C) SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL; (D) None of the above

Last Answer : B) SELECT NAME FROM EMPLOYEE;

Description : Write a program to input name and salary of employee and throw user defined exception if entered salary is negative. 

Last Answer : import java.io.*; class NegativeSalaryException extends Exception { public NegativeSalaryException (String str) { super(str); } } public class S1 { public static void main(String[] args) ...  catch (NegativeSalaryException a) {  System.out.println(a);  } } }

Description : Payment made by an employer to employee monthly, other than salary is called …………. A) Bonus B) Allowances C) Benefits D) None of these

Last Answer : B) Allowances

Description : Write a program to implement the concept of virtual base class for following figure. Accept and display information of one employee with his name, code, basic pay, experience and gross salary with the object of employee class.

Last Answer : #include<iostream.h> #include<conio.h> class Master  {  char name[10],code[3];  public:  void acceptM() { cout<<"\nEnter name and code "; cin>>name>>code; ... .displayM(); e.displayA(); e.displayD(); e.displayE(); getch();  }

Description : Identify the columns out of the given three, which should not be present in each of the following tables: -Technology

Last Answer : (i) DateofBirth(ii) Admno(iii) Phonenumber

Description : Key field is a unique identifier for each record. It is defined in the form of (a) rows (b) columns -Technology

Last Answer : (b) Key is a data item that allows you to uniquely identify individual occurrences which is defined as the column or set of columns.

Description : Which tag is used to add columns in the tables? (a) (b) -Technology

Last Answer : (b) is used to add columns in the tables.