What is SQL?
SQL (Structured Query Language) is a ANSI (American National Standards Institute) standard computer language for accessing and manipulating database systems. Using SQL statements, we can create a database, create a tables in the database, insert records in to table, update and delete records in the table etc. SQL works with database programs like Oracle, MySQL, PostgreSQL, SQLite, DB2, SQL Server, Sybase, MS Access and many more.
What is a primary key?
Primary key is a column or a set of columns that uniquely identifies each row in the table and Primary key cannot have NULL value & there should be only one primary key in a table.
Write an SQL query to find the number of students studying in 'CSE' department.
SELECT COUNT(*) FROM Students WHERE department = 'CSE';
Write an SQL query to find names of student start with 'A' ?
SELECT * FROM Students WHERE student_name like 'A%';