Computer Science, asked by sunitagupta54637, 10 months ago

Create a table patient with pcode as primary key. decide your own data types. insert records as shown in the table below and write the commands for the following.
a. display the details of all the patients under the age of 25.
b.display the details of all the patients in the ent department.
c.display the sum if the charge field.
d.display the number of male and female patients.
e.display the numbers of different departments given in the table.

Attachments:

Answers

Answered by Anonymous
1

Answer:

Tables

In order to be able to add and manipulate data, you first have to create a database. There’s not much to this. You’re creating just a container in which you will add tables. Creating a table is more involved and offers many choices. There are several types of tables from which to choose, some with unique features. When creating tables, you must also decide on the structure of each table: the number of columns, the type of data each column may hold, how the tables will be indexed, and several other factors. However, while you’re still learning, you can accept the default setting for most of the options when creating tables.

There are a few basic things to decide when creating a structure for your data:

The number of tables to include in your database, as well as the table names

For each table, the number of columns it should contain, as well as the column names

For each column, what kind of data is to be stored

For the last part, in the beginning, we’ll use just four types of columns: columns that contain only numbers; columns that contain alphanumeric characters, but not too many (i.e., a maximum of 255 characters); columns that contain plenty of text and maybe binary files; and columns for recording date and time information. This is a good starting point for creating a database and tables. As we get further along, we can expand that list of column data types to improve the performance of your databases.

This chapter contains examples of how to create a database and tables. The text is written on the assumption that you will enter the SQL statements shown on your server, using the mysql client. The exercises at the end of this chapter will require that you make some changes and additions to the database and its tables on your computer. So, when instructed, be sure to try all of the examples on your computer.

The database and the tables that we create in this chapter will be used in several chapters in this book, especially in Part III. In those later chapters, you will be asked to add, retrieve, and change data from the tables you create in this chapter. Exercises in subsequent chapters assume that you have created the tables you are asked to create in this chapter. Thus, in order to get the most value possible from this book, it’s important that you complete the exercises included for each chapter. It will help reinforce what you read, and you will learn more.

Answered by N3KKI
4

\huge\bold\red{HOLA!!}

c.display the sum if the charge field.

d.display the number of male and female patients.

e.display the numbers of different departments given in the table....

Hope you understood

Mark it as brainliest answer

Similar questions