Posts

Showing posts from July, 2022

DATABASE (SQL) DAY 7 AND 8 ) JOINING , CLAUSE

Image
                                        *JOINING* *  JOINING IS A COMMUNICATON  BETWEEN TWO OR MORE TABLE. * REDUCE THE COMPLECITY OF TABLE * THERE ARE SOMETIMES OF JOINING USE THEN SQL. * ON  KEYWORD IS USED TO ACTIVATE THE JOIN CONDITION. *  JOINING IS TO BE RETURN NULL DATA VALUE . IF RECORD NOT FOUND. * TYPES OF JOINING   1)INNER JOIN   2)LEFT OUTER JOIN  3)RIGHT OUTER JON  4) FULL OUTER JOIN                            *INNER JOIN* *  INNER JOIN RETURN ALL ROW FROM MULTIPLE TABLE WHERE THE JOIN           CONDITION IS MEET. *  INNER JOIN ALWAYS RETURN EQUAL VALUE. * QUERY:- :-  CREATE TABLE PRODUCT1 (PID INT,PRODUCT VARCHAR(50)); :-CREATE TABLE INVENTRY(PID INT,COST INT); :-INSERT INTO PRODUCT1 VALUES(201,'HIMALYA'); :-INSERT INTO PR...

DATABASE (SQL) DAY 6) VIEW , UNION ,UNION INTERSECT, UNION ALL

Image
                              * DATABASE  VIEW* * DATABSE VIEW:-VERTUAL TABLE *  DOESN'T PHYSICALLY EXIST IS SQL SERVER. * THERE ARE FOLLOWING CONCEPT IN A VIEW     1) CREATE VIEW 2)UPDATE VIEW 3)DROP VIEW  :--ALL VIEW IS USE TO TABLE OBJECT  QUERY:- 1)CREATE VIEW QUERY ;-select view command :- CREATE VIEW viewname AS SELECT stu1.roll,stu1.mobile from stu1; :- SELECT * FROM viewname; 2)UPDATE VIEW QUERY ; alter view command :-ALTER VIEW  viewname  AS SELECT stu1.mobile FROM stu1; :-SELECT * FROM  viewname  ; :-ALTER VIEW  viewname  AS SELECT stu1.roll FROM stu1; 3)DELETE VIEW QUERY : drop view command :-DROP VIEW  viewname ; :-SELECT * FROM  viewname ;                           *UNION*  * IT USED TO DIFFERENT TABLE  * UNION IS REMOVE DUPLICATE ROW BETWEEN SELECT QUERY. ...

DATABASE (SQL) DAY 5) TEMPORARY TABLE, ALIAS

Image
                                 *TEMPORARY TABLE* * TEMPORARY TABLE IS USE TO CREATE FEW TIME LIMITATION. *THERE ARE TWO TYPES OF TABLE. --1) LOCAL TEMPORARY TABLE  #    2)GLOBAL TEMPORARY TABLE  ##                                       *LOCAL TEMPORARY TABLE* * LOCAL TEMPORARY TABLE AUTOMATICALY DELETED THIS TABLE WHEN THERE ARE            NO LONGER USE . *LOCAL TEMPORARY TABLE REPRESENTED THE # TAG SYMBOL. *QUERY:-- :-CREATE TABLE #doctor(name VARCHAR(50),bedno INT,city VARCHAR(50)); :-INSERT INTO #doctor VALUES('sumar',200,'nagpur'); :-INSERT INTO #doctor VALUES('ajay',201,'pune'); :-INSERT INTO #doctor VALUES('suman',202,'nashik'); :-SELECT * FROM #doctor;                             ...

DATABASE (SQL) DAY 4) CHANGE DATA TYPE, MULTIPLE STRING,BETWEEN, SQL FUNCTION

Image
                                                  *DATA TYPE* * HOW TO CHANGE DATA TYPE *ALTER COMMAND   QUERY:- -: ALTER TABLE stu2 ALTER COLUMN name NVARCHAR (50); -: SELECT * FROM stu2; -: SP_HELP stu2;                                              *STRING QUERY* * FIND A MULTIPLE STRING IN A QUERY USE IN A QUERY USE IN OPERATOR. QUERY :-   SELECT * FROM student WHERE city IN ('NAGPUR','PUNE','NASHIK'); SELECT * FROM student WHERE city NOT IN ('NAGPUR'); SELECT * FROM student WHERE city <>'NAGPUR';                                                   *BETWEEN* QUERY:- SELECT * FROM emp WHERE salary BETWEEN 10...

DATABASE (SQL)day 3) CHECK CONSTARAINT , KEY, DROP COLUMN(DELETE)

Image
                                                      *  CHECK CONSTRAINT * CHECK CONSTARINT DIRECTRY APPLY TO PERTICULAR COLUMN. QUERY:-  - create table emp(id int ,name varchar(50),salary INT ,CONSTRAINT sell CHECK(salary>1000));   -    INSERT INTO emp VALUES (101,'MOHAN',2000);   -   INSERT INTO emp VALUES (102,'SOHAM',500);    -  SELECT * FROM emp;                                               * KEY * * KEY  IS USE TO MANAGING THE TABLE . *THERE ARE SOMETYPES OF KEY  1)PRIMARY KEY  :-NO BLANK ,NO REPEAT  2)UNIQUE KEY     :-NO REPEAT ,BLANK POSSIBLE  3)FOREIGN KEY                   *PRIMARY KEY* Q)...

DATABASE(DAY 2) WINDOW AUTHONTICATION (COMMAND ,DELETE DB, NOTNULL, ADD EXISTING TABLE, CRETE TABLE FROM TABLE

Image
                                    * WINDOW AUTHONTICATION * SERVER NAME = 1) . (DOT) AUTOMATIC SEREVER FINDER                                 2) .\SQLEXPRESS *  WINDOW AUTHONTICATION MEAN LOCAL MODE.  __________________________________________________________________________________                 *DATABASE CREATION COMMAND *   STEP  1) CREATE DATABASE --> RIGHT CLICK ON DATABASE-->NAW DATABASE -->                                 DATABASE NAME (COLLAGE)    STEP 2 )  SELECT YOUR DATABASE NAME -->RIGHT CLICK -->ADD NEW QUERY OPTION ___________________________________________________________________________________     *HOW TO DELETE DABA...

DATA BASE (DAY 1) BASIC(ENTITY,RECORD , FIELD, QUERY, INSERT )

Image
                                                  **DATABASE**         1)  DATABSE IS A COLLECTION OF ENTITY.  2)   WHAT IS ENTITY ?   =  ENTITY IS A COLLECTION OF FIELD AND RECORD.  3) WHAT IS FIELD ?  = FIELD IS A REPRENTING OF RECORD. *SINGLE VALUE FIELD [ROLL,ID,UNIQUE] * MULTI VALUE FIELD[FIRST NAME ,SECOND NAME,SIRNAME]       * NULL FIELD [MOBILE , BLOOD GROUP EX BLANK]     * DATABASE TOOLS   1)SQL SERVER   2) MS ACCESS   3) EXCEL   4) XML  * DATABASE QUERY   * DATABASE IS A SET OF INSTROCTION SETUP IN A DATABASE.   * INSERT QUERY     *TWO TYPES OF QUERY      1) ALL COLOUM =INSERT INTO STUDENT(tablename)VALUES(10,'MOHAN','NAGPUR')      2) PERTICULAR COLOUM=INSERT INTO STUDENT(tablename)VALU...