group by category of movie




group by two fields i.e. category + year_released



Having condition


Select into
To create a structure of existing table we use select into.


To insert date from existing table to new table.

Student _details table







Isnull() function:
Replaces the column name with given value if the column is null.
isnull(column_name,replaced_value)








Case

Updating  table using case

movies2 table:

After updating movies2 table

insert into select
used to insert data from one table to the other which is already created.
date types should be match in both the tables.

the following query gives error because movies3 table is not there in the database.

After creating the movies3 table.




Comments

Popular posts from this blog

CPU parts