Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
GO
/****** Object: Database [Practice6] Script Date: 24-02-2023 14:34:07 ******/
CREATE DATABASE [Practice6]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'Practice6', FILENAME = N'C:Userseygdnet03Practice6.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB )
LOG ON
( NAME = N'Practice6_log', FILENAME = N'C:Userseygdnet03Practice6_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB )
WITH CATALOG_COLLATION = DATABASE_DEFAULT
GO
ALTER DATABASE [Practice6] SET COMPATIBILITY_LEVEL = 150
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [Practice6].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [Practice6] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [Practice6] SET ANSI_NULLS OFF
GO
ALTER DATABASE [Practice6] SET ANSI_PADDING OFF
GO
ALTER DATABASE [Practice6] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [Practice6] SET ARITHABORT OFF
GO
ALTER DATABASE [Practice6] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [Practice6] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [Practice6] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [Practice6] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [Practice6] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [Practice6] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [Practice6] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [Practice6] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [Practice6] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [Practice6] SET DISABLE_BROKER
GO
ALTER DATABASE [Practice6] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [Practice6] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [Practice6] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [Practice6] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [Practice6] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [Practice6] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [Practice6] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [Practice6] SET RECOVERY SIMPLE
GO
ALTER DATABASE [Practice6] SET MULTI_USER
GO
ALTER DATABASE [Practice6] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [Practice6] SET DB_CHAINING OFF
GO
ALTER DATABASE [Practice6] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
GO
ALTER DATABASE [Practice6] SET TARGET_RECOVERY_TIME = 60 SECONDS
GO
ALTER DATABASE [Practice6] SET DELAYED_DURABILITY = DISABLED
GO
ALTER DATABASE [Practice6] SET ACCELERATED_DATABASE_RECOVERY = OFF
GO
ALTER DATABASE [Practice6] SET QUERY_STORE = OFF
GO
USE [Practice6]
GO
/****** Object: Table [dbo].[OrderDetails] Script Date: 24-02-2023 14:34:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OrderDetails](
[orderID] [int] NULL,
[productID] [int] NULL,
[quantity] [int] NULL,
[lineNumber] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Orders] Script Date: 24-02-2023 14:34:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Orders](
[orderId] [int] IDENTITY(1,1) NOT NULL,
[customerID] [int] NULL,
[dateOfOrdered] [datetime] NULL,
[dateRequired] [datetime] NULL,
[status] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Product] Script Date: 24-02-2023 14:34:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Product](
[productID] [int] IDENTITY(100,1) NOT NULL,
[name] [varchar](100) NULL,
[description] [varchar](100) NULL,
[quantity] [int] NULL,
[unitPrice] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Products] Script Date: 24-02-2023 14:34:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Products](
[productID] [int] IDENTITY(100,1) NOT NULL,
[name] [int] NULL,
[description] [varchar](100) NULL,
[quantity] [int] NULL,
[unitPrice] [int] NULL
) ON [PRIMARY]
GO
/****** Object: StoredProcedure [dbo].[SP_GetAllProductById] Script Date: 24-02-2023 14:34:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_GetAllProductById]
@id int
AS BEGIN
Select * from Product where productID=@id;
END;
GO
/****** Object: StoredProcedure [dbo].[SP_GetAllProducts] Script Date: 24-02-2023 14:34:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_GetAllProducts]
AS BEGIN
Select * from Product;
END;
GO
/****** Object: StoredProcedure [dbo].[SP_GetOrderDetailsByOrderId] Script Date: 24-02-2023 14:34:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_GetOrderDetailsByOrderId]
@id int
AS BEGIN
Select * from OrderDetails where orderID=@id;
END;
GO
/****** Object: StoredProcedure [dbo].[SP_GetOrderDetailsByProductId] Script Date: 24-02-2023 14:34:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_GetOrderDetailsByProductId]
@id int
AS BEGIN
Select * from OrderDetails where productID=@id;
END;
GO
/****** Object: StoredProcedure [dbo].[SP_GetProductNameByOrderId] Script Date: 24-02-2023 14:34:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_GetProductNameByOrderId]
@id int
AS BEGIN
Select name from Product where productID=(Select productID from OrderDetails where orderID=@id);
END;
GO
USE [master]
GO
ALTER DATABASE [Practice6] SET READ_WRITE
GO
![]() |
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team