Posts

Data Types & Expressions

Image
  Data Types in C Each variable in C has an associated data type. It specifies the type of data that the variable can store like integer, character, floating, double, etc. Each data type requires different amounts of memory and has some specific operations which can be performed over it. The data type is a collection of data with values having fixed values, meaning as well as its characteristics. The data types in C can be classified as follows: Types Description Primitive Data Types Primitive data types are the most basic data types that are used for representing simple values such as integers, float, characters, etc. User Defined Data Types The user-defined data types are defined by the user himself. Derived Types The data types that are derived from the primitive or built-in datatypes are referred to as Derived Data Types.   Different data types also ha...

Application of SQL Commands for Structure Creation and Alteration

Image
  Application of SQL Commands for Structure Creation and Alteration Structured Query Language (SQL) is a powerful language used to interact with and manage relational databases. Among the many operations SQL supports, creating and altering database structures are fundamental for defining how data is stored and organized. These operations typically involve creating tables, modifying existing tables, and defining or altering constraints. 1. Structure Creation Structure creation in SQL usually involves creating a new database, table, or other database objects (like indexes, views, or schemas). The most common use case is creating tables that define the structure of data. Creating a Table The CREATE TABLE statement is used to define a new table along with its columns and data types. Syntax : CREATE TABLE table_name ( column1 datatype [constraints], column2 datatype [constraints], ... columnN datatype [constraints] ); EXAMPLE CREATE TABLE Employees ( EmployeeID INT PRI...