Computer Science, asked by preetjii, 1 year ago

plz tell me all sql commands question with answer. class 10 plz tommorrow is my exam. plz​

Answers

Answered by Anonymous
1

PFA........................

Attachments:

preetjii: all the best abhijiy prakash and angel jiii
preetjii: nd thnx to both of u
preetjii: nd thnx to both of u
preetjii: nd thnx to both of u
AbhijithPrakash: welcs
Anonymous: welcome
lastbenchstudent: in Q29 We are creating a table having 4 properties. Book ID, Book Name, Author, Price. Now each property can have a different data type. For example Book id has data type char and Bname and author have the data type varchar of length 15 and 20. Price has data type decimal. Now we want to create a table using all this property. Also we some constraints which are useful for better data storage and access.
lastbenchstudent: Now syntax for create table is

create table tableName (fieldName1 fieldDataType1 fieldConstrains, filedName2, fieldDataType, fieldConstraints)

so lets create it
create table book (bookId char PRIMARY KEY, Bname varchar(15), author varchar(20) , price decimal)
lastbenchstudent: Now PRIMARY KEY is a constraints using which we maintain the uniqueness of column . SO in our table book id should be unique so that only one id should be assigned to only one book, same id cant be assigned to another book, also bookId is the identification id of book. So we choose book ID for primary key
lastbenchstudent: i guess rest of answer you can get by shared link. Here are some link u can go though. https://www.w3schools.com/sql/default.asp
Similar questions