Skip to content

Instantly share code, notes, and snippets.

View UtkarshYadav01's full-sized avatar

Utkarsh Yadav UtkarshYadav01

View GitHub Profile
-- REPLACE INTO SQL Demonstration
-- This script demonstrates how REPLACE INTO combines INSERT and DELETE operations
-- to simplify the process of updating or inserting records based on primary or unique key values.
-- Create and use database
CREATE DATABASE replace_demo;
USE replace_demo;
-- Create products table
CREATE TABLE products (
-- SQL DELETE Tutorial
-- Demonstrates how to remove records from a database table
-- DELETE FROM table_name WHERE condition;
-- Create a database for our examples
CREATE DATABASE delete_tutorial;
-- Use the database
USE delete_tutorial;
-- =============================================
-- MySQL Subqueries Demonstration
-- Online Store Database Example
-- =============================================
-- Create database and set it as the active database
CREATE DATABASE online_store;
USE online_store;
-- =============================================
-- Create the database
CREATE DATABASE store_inventory;
-- Switch to the new database
USE store_inventory;
-- Create products table
CREATE TABLE products (
product_id INT PRIMARY KEY,
product_name VARCHAR(50) NOT NULL,
@UtkarshYadav01
UtkarshYadav01 / Docker Commands
Last active January 5, 2025 00:21
Docker Commands
==========================================
Docker Commands
==========================================
1. docker --version
- Check version.
2. docker images
- List all Docker images.
@UtkarshYadav01
UtkarshYadav01 / Maven Build Lifecycle Phases.txt
Created January 4, 2025 23:58
Maven Build Lifecycle Phases
==========================
Maven Build Lifecycle Phases
==========================
1. validate
- Validate the project is correct and all necessary information is available.
2. compile
- Compile the source code of the project.

Bash Terminal Commands

The basic terminal commands for navigating and manipulating directories and files are as follows:


File Content Commands

cat Command

@UtkarshYadav01
UtkarshYadav01 / JSP Cheat Sheet.md
Last active September 19, 2024 01:15
Java Refresher Notes

JSP Tag Cheat Sheet

1. Scriptlet Tag (<% %>)

  • Used for writing Java code directly within a JSP.

    <% int count = 42; %>

2. Declaration Tag (&lt;%! %&gt;)