{"id":124243,"date":"2023-04-28T10:00:22","date_gmt":"2023-04-28T04:30:22","guid":{"rendered":"https:\/\/www.aplustopper.com\/?p=124243"},"modified":"2023-04-29T09:53:10","modified_gmt":"2023-04-29T04:23:10","slug":"plus-two-computer-application-notes-chapter-9","status":"publish","type":"post","link":"https:\/\/www.aplustopper.com\/plus-two-computer-application-notes-chapter-9\/","title":{"rendered":"Plus Two Computer Application Notes Chapter 9 Structured Query Language"},"content":{"rendered":"
SQL – Structured Query Language developed at IBM\u2019s San Jose Research Lab.<\/p>\n
The result of the compilation of DDL statements is a set of tables, which are stored in a special file called data dictionary.<\/p>\n
Creating a database in Mysql
\nCREATE DATABASE <database_name>;
\nEg: mysql>CREATE DATABASE BVM;<\/p>\n
Opening a database
\nUSE command used to use a database
\nUSE <database_name>;
\nEg: mysql>USE BVM;<\/p>\n
SHOW command is used to list entire database in our system.
\nmysql>SHOW DATABASES;<\/p>\n
Data Types<\/span><\/p>\n 1. Char – It is used to store fixed number of characters. It is declared as char(size).<\/p>\n 2. Varchar – It is used to store characters but it uses only enough memory.<\/p>\n 3. Dec or Decimal – It is used to store numbers with decimal point. It is declared as Dec (size, scale). We can store a total of size number of digits.<\/p>\n 4. Int or Integer – It is used to store numbers with\u00acout decimal point. It is declared as int. It has no argument. Eg: age int.<\/p>\n 5. Smallint – Used to store small integers.<\/p>\n 6. Date – It is used to store date. The format is yyyy-mm-dd. 7. Time – It is used to store time. The format is<\/p>\n DDL commands (3 commands)<\/p>\n DML commands (4 commands)<\/p>\n DCL (Data Control Language) commands<\/p>\n Rules for naming tables and columns<\/p>\n Constraints are used to ensure database integrity.<\/p>\n Order By – Used to sort rows either in ascending (asc) or descending (desc) order.<\/p>\n Aggregate functions<\/p>\n Group by clause is used to group the rows. Having clause is used with Group By to give conditions.<\/p>\n Kerala Plus Two Computer Application Notes Chapter 9 Structured Query Language SQL – Structured Query Language developed at IBM\u2019s San Jose Research Lab. The result of the compilation of DDL statements is a set of tables, which are stored in a special file called data dictionary. Creating a database in Mysql CREATE DATABASE <database_name>; Eg: […]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[42728],"tags":[],"yoast_head":"\n
\nEg: \u20181977-05-28\u2019.<\/p>\n\n
\n
\n
\n
\n
\n
Plus Two Computer Application Notes<\/a><\/h4>\n","protected":false},"excerpt":{"rendered":"