Skip to main content

Posts

Showing posts with the label SQL

SQL Script : Adventure works database setup and Select query, list of tables #100daysofsql

Hi all,   Welcome to 100 days of SQL script code   In this blog post, will start with AdventureWorks sample database in Microsoft SQL server   Install MS SQL server and SSMS latest version  Download bak file from https://docs.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver15&tabs=ssms Follow the restore steps in the same above link after restoring below adventure work database below  Run the below query in SQL server -- showing list of tables select * from INFORMATION_SCHEMA.TABLES   output  customer and product table select query -- customer and product table  select * from SalesLT.Customer select * from SalesLT.Product Outputs are

MySql linux terminal Commands: Basic commands to create and drop databases commands

1. Login on mysql  command mysql -u root -h localhost -p 2. Check Status mysql> status 3. show databases mysql> show databases; 4. Show variables mysql> show variables; 5. Show processlist mysql> show processlist; 6. Using and selecting system already available mysql database mysql> use mysql; mysql> select database(); 7. select user table in mysql database mysql> select Host, User from user or mysql> select Host, User from mysql.user 8. Create database and display it mysql> create database tempDB; mysql> show databases; mysql> use tempDB; mysql> select database(); 9. Drop database  mysql> drop database tempDB;  mysql> show databases; 10. exit  mysql   mysql> exit  

How to Retrieve Data from database and view datas in label or textbox using ASP.NET and SQL

Here I'll show you how to get data from Database and that Database can be fetched as Label text or textbox text;   1. Design View    2. Source View 3. Code Behind ; Here I've using Student database 4. Output After Debugging Before giving Input data; 5. Student Database 6. Output